Skip to main content

Import an SSL certificate

You can import an SSL certificate into the Java certificate TrustStore to enable SSL.

Before you begin:

You have obtained an SSL certificate from your browser:

To complete this task:

  1. Open a command-line window as an administrator.

  2. Navigate to the %JAVA_HOME% directory that your Veracode plugin is using.

  3. To import the certificate, run:

    keytool -importcert -file C:\temp\example.cer -keystore lib\security\cacerts -alias sslinspection 
    Enter keystore password:
  4. Enter the keystore password. The default is changeit. A confirmation message opens informing you the certificate is now in the keystore.

  5. Enter y to trust the certificate. To complete the import, you might need to restart the IDE or CI/CD where the plugin is running.

  6. Optionally, to confirm that the import succeeded, run the following command from the %JAVA_HOME% directory to export the contents of the cacerts file to a text file.

    keytool.exe -list -v -keystore lib\security\cacerts > C:\temp\cacerts.txt