If you have downloaded or received the Code Signing Certificate for Sun Java in x.509 format, please follow these instructions to install the Code Signing Certificate and the corresponding Intermediate CA certificates into your keystore.
Step 1: Install Code Signing Intermediate CA certificate into the keystore
- Download the Intermediate CA certificate here: INFO1739
- Copy the Intermediate CA certificate and paste it in a text editor such as Notepad or Vi.
- Make sure there are 5 dashes to either side of the BEGIN CERTIFICATE and END CERTIFICATE and that no white spaces, extra line breaks or additional characters have been inadvertently added.
- Save the file as intermediate.cer
- Use the following command to import this Certificate into the keystore:
keytool -import -trustcacerts -alias Intermediate -keystore your_keystore_filename -file intermediate.cer
Step 2: Install Sun Java certificate into keystore
- Save the x.509 formatted file as sunjava.cer
- Use the following command to import the Sun Java Code Signing certificate into the keystore:
keytool -import -trustcacerts -alias your_alias_name -keystore keystore_name -file sunjava.cer
Step 3: Confirm the contents of the keystore
- Enter the following command to list the contents of the keystore:
keytool -list -v -keystore your_keystore_filename >output_filename
- View the contents of the output file
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: alias
Creation date: Jul 1, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 3
- Verify the following information:
The Code Signing Certificate for Sun Java certificate is imported into the alias with the "Entry Type" of PrivateKeyEntry or KeyEntry. If not, please import the certificate into the Private Key alias.
The Certificate chain length is 3.