I have a Certificate that has been added to a keystore using a KeyTool. I have also been provided private keys for use in Production / Test environment. I understand that the certificate is using a public key. Where do i place the keystore and the private keys to be able to be read by the command line programme. The following key reads the keystore.
System.setProperty("javax.net.ssl.keyStore", "xxx.ks");
System.setProperty("javax.net.ssl.keyStorePassword", "xxx_4ps!");
System.setProperty("javax.net.ssl.trustStore", "xxx.ks");
System.setProperty("javax.net.ssl.trustStorePassword", "xxx!");.
Where do i have to place the private keys to be read by the programme. I am new to public/private key encryption so any help would be appreciated.
Kind Regards, Mateen
The private key and its corresponding certificate go in the javax.net.ssl.keyStore.
Certificates that you want to trust go in the javax.net.ssl.trustStore. Often you don't have one of your own, just use the default supplied with the JDK, in which case you don't specify this property at all.