Generating a SSL Certificate in Tomcat (Keytool) Java (Generic)

Installing the certificate to your Java Keystore:

1) First, Download the SSL Certificate file which is normally saved as your_domain_name.p7b from the Account to the same folder in which your Keystore is located. The .p7b file has ALL Certificates needed for the Keystore.

NOTE: You must install the certificate to the same Keystore in which you used to create and generate your CSR. If you try to install it to a different Keystore you will receive an error message.

2) Next, to install the certificate file enter the following command: keytool -import -trustcacerts -alias server -file your_domain_name.p7b -keystore your_site_name.jks

3) Once the command has been entered, and the certificate installed properly you will then receive a message stating, “Certificate reply was installed in keystore.”

4) Next you may be instructed to “trust the certificate” if so, choose the option “Y” or “Yes.”

5) The Keystore file (your_site_name.jks) has now been installed and is ready for use on your individual server.

At this point, you will be able to configure the server and begin using it.