Extracting a certificate from the keystore

You must extract the certificate keystore used by the server.

Prerequisites

  • Before extracting a certificate from the keystore, when you are running the Java client, you must have set the JVM to run with the correct parameters. See Certificate parameters for testing.
  • You must know the password that the keystore was generated with.

Procedure

  1. Type the following command.
    keytool -export -keystore drive:/keystore -alias
    tomcat -file drive:/keystore.cer
    where drive:/keystore is the keystore used by the server.
  2. Provide the password of the keystore.
    Enter the keystore password:  mypassword

Result

The certificate is stored in keystore.cer.