• Register
0 votes
291 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 5 3
6,930 points

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.

9 7 4
38,600 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

 

10 6 4
31,120 points

Related questions

0 votes
2 answers 186 views
186 views
Problem : I am getting bellow error while using keytool keytool error: java.lang.exception: public keys in reply and keystore don't match
asked Oct 19, 2019 peterlaw 6.9k points
0 votes
1 answer 98 views
98 views
Problem : When I installed the final certificate I got the following error: keytool error: java.lang.Exception: Failed to establish chain from reply
asked Oct 23, 2019 peterlaw 6.9k points
0 votes
2 answers 2.4K views
2.4K views
Problem : I am facing following keytool error 'keytool' is not recognized as an internal or external command, operable program or batch file.
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 926 views
926 views
Problem : I have encountered following keytool error 'openssl' is not recognized as an internal or external command, operable program or batch file.
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
2 answers 253 views
253 views
Problem : I am getting bellow error when I try to use Integer.parseInt() with a single char exception in thread "main" java.lang.numberformatexception: for input string: "s"
asked Oct 19, 2019 peterlaw 6.9k points