Search code examples
javakeystore

SSL and cert keystore


How does my Java program know where my keystore containing the certificate is?

Or alternatively: How do I tell my Java program where to look for the keystore?

After specifying the keystore in some way, how to specify the certificate to use for authenticating the server to client?


Solution

  • System.setProperty("javax.net.ssl.trustStore", path_to_your_jks_file);