• Register
0 votes
504 views

Problem :

The bellow error occurs while importing a Sun Java certificate into a Keystore:

keytool error: java.lang.Exception: Input not an X.509 certificate

6.9k points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

There are 3 ways to fix this issue

1. Incorrect Alias Specified:

This error occurs if the wrong Alias was specified while installing the Sun Java Code Signing certificate to the Keystore.The correct Alias to be used would be the Alias used when generating the Certificate Signing Request (CSR) that was submitted for the enrollment of the certificate.
2. Improper Format:

If the Sun Java Code Signing certificate was saved in an improper way, this error can occur.

3. Incorrect Keystore being Used:

If a different Keystore is used than the Keystore that was used to generate the CSR that was submitted for the enrollment of the certificate, this error can occur.

38.6k points
0 votes

Solution:

Reason Behind This problem

  1. The inexact alias was specified while attempting to install the certificate.

  2. The certificate being imported is unreasonably formatted.

  3. The certificate is being imported into an false keystore.

Please review every of the probable options below and their fixes to troubleshoot this error:

Option 1 - Incorrect Alias Secluded:

This error can happen in case the wrong Alias was secluded when trying to install the Sun Java Code Signing certificate to the Keystore.  The appropriate Alias to use would be the Alias applied at the time of  producing the Certificate Signing Request (CSR) that was submitted for the enrollment of the certificate.

Option 2 - Improper Format:

In case the Sun Java Code Signing certificate was saved in an inappropriate method, this error can happen.

Option 3 - Inappropriate Keystore being employed:

In case a diverse Keystore is being employed, than the Keystore that was used to produce the CSR that was submitted for the enrollment of the certificate, this error can happen.

Option 4: Employ the following syntax while performing the import function

keytool -import -trustcacerts -alias alias_name -file certificate_file.p7b -keystore keystore_name

 

31.7k points
edited by