After my previous post concerning the SSL, PorteCle Generate KeyStore, self-signed certificate, tool PorteCle, concerning the generation of server’s KeyStore, self-signed certificate…, in this post, i would expose the case of a server SERVER1 which communicates with an other server securized SERVER2 (like Jboss, Tomcat,…), so, now, we are speaking about the TrustStore of server.
A keystore contains private keys, and the certificates with their corresponding public keys. A truststore contains certificates from other parties that you expect to communicate with, or from Certificate Authorities that you trust to identify other parties.
So it’s necessary to add the certificate of SERVER1 contained in its KeyStore, into the TrustStore of SERVER2.
Create a new TrustStore
First, execute the portecle and create a new KeyStore/TrustStore which will contain the certificate:
… select the type Java Keystore:
Import a trusted certificate
Importation of a new certificate (or Key Pair) in the previous created TrustStore for the SERVER2:
…then, select the *.cer certificate file of SERVER1:
…give the same name than the *.cer file to the imported certificate:
…finally, save the TrustStore of SERVER2 with the name myTrustStore.ks on the local disk with a specific password myPass123:
Tomcat Server Configuration
Copy this TrustStore on SERVER2 file system and modify the “Java Options” of Tomcat server in order to add the following options (Configure Tomcat or Eclipse server environment):