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:
- Obtain a certificate using Chrome
- Obtain a certificate using Internet Explorer
- Obtain a certificate using Firefox
To complete this task:
-
Open a command-line window as an administrator.
-
Navigate to the
%JAVA_HOME%
directory that your Veracode plugin is using. -
To import the certificate, run:
keytool -importcert -file C:\temp\example.cer -keystore lib\security\cacerts -alias sslinspection
Enter keystore password: -
Enter the keystore password. The default is
changeit
. A confirmation message opens informing you the certificate is now in the keystore. -
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. -
Optionally, to confirm that the import succeeded, run the following command from the
%JAVA_HOME%
directory to export the contents of thecacerts
file to a text file.keytool.exe -list -v -keystore lib\security\cacerts > C:\temp\cacerts.txt