Adding an Existing Certificate to a New Keystore

Use the Java keytool utility to create a keystore to securely encapsulate the certificate.

  1. Locate the keytool inside the JDK bin directory.

  2. Make sure the certificate file (.cer) is located on the same machine as the JDK.

  3. Execute the keytool command as follows, substituting values for alias, file, and keystore.

    keytool -import -alias <your-alias> -file <your-cer-file> -keystore <your-keystore-name>
    

    e.g.

    keytool -import -alias abcdomain -file "/usr/certs/mycert.cer " -keystore "/usr/certs/mykeystore.jks"
    
  4. Enter a password for the keystore, make sure to remember this password as it will be used in configuring the HTML Server in Server Manager.

  5. You will be prompted to trust the certificate, type Yes and then click Enter.

  6. The system stores the keystore in the location you indicated with the .jks extension.

  7. To verify that the certificate is in the keystore, use the following keytool utility command. Enter the password when prompted. The system lists the certs in the store.

    keytool -list -v -keystore ""/usr/certs/mykeystore.jks"