How would I go about adding a certificate as trusted to the current JVM instance without chaging or deleting existing trusted certificate entries? Additionally this must not modify any truststores on the filesystem and should only be valid in the current jvm instance.

Is there any way to do this?

有帮助吗?

解决方案

Copy the cacerts file that ships with Java.

Use either the keytool command or the InstallCert application to add certficates or CAs as needed.

Then use the -Djavax.net.ssl.trustStore="file path to new truststore" -Djavax.net.ssl.trustStorePassword="password for new truststore" VM arguments as needed when you start your application.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top