Import the certificate to the trust store
The certificate created in Section 15.2.1.2, “Export a self-signed certificate” must be copied to the client in order to perform the steps detailed in Procedure 15.3, “Import the certificate to the trust store "localhost.truststore"” . Procedure 15.3. Import the certificate to the trust store "localhost.truststore" This procedure imports a certificate that was previously exported on a server to the trust store on a client. Issue the following command on the client: keytool -import -alias ejb-ssl -file mycert.cer -keystore localhost.truststore Enter the password for this trust store if it already exists; otherwise enter and re-enter the password for a new trust store. Verify the details of the certificate. If it is the correct one, type 'yes' to import it to the trust store. Result: The certificate is imported to the trust store, and a secure connection can now be established with a server that uses this certificate. As with the key store, if the trust store specified does not already exist, it is created. However, in contrast with the key store, there is no default trust store and the command fails if one is not specified.