Search code examples
javasslsystem-properties

How do I Use "Multiple" SSL certificates in Java?


I have an application that communicate with multiple hosts at the same time. In this case I need to use multiple keystores to establish communication with other hosts.

In this case setting the system property "javax.net.ssl.keyStore" is problematic. I found an earlier post that discusses the problem well.

Then what would be the best approach to resolve this problem?


Solution

  • You can import multiple certificates into a single keystore. keytool