Reputation: 1082
I have a self-signed JAR file. I would like for it to be able to:
The jar does not need to check or verify the certificate with a server.
Any help would be appreciated. Thanks! :)
Upvotes: 2
Views: 1330
Reputation: 1108722
Use CodeSource#getCertificates()
.
Certificate[] certificates = YourClass.class.getProtectionDomain().getCodeSource().getCertificates();
Upvotes: 2