The following error occurs when importing a Sun Java™ certificate into a Keystore:
keytool error: java.lang.Exception: Input not an X.509 certificate
There are a few causes for this error.
The incorrect alias was specified while trying to install the certificate.
The certificate being imported is improperly formatted.
The certificate is being imported into an incorrect keystore.
Please review each of the possible options below and their fixes to troubleshoot this error:
Option 1 - Incorrect Alias Specified:
This error can occur if the wrong Alias was specified when attempting to install the Sun Java Code Signing certificate to the Keystore. The correct Alias to use would be the Alias used when generating the Certificate Signing Request (CSR) that was submitted for the enrollment of the certificate.
For further information, please see solution ID: SO4333
Option 2 - Improper Format:
If the Sun Java Code Signing certificate was saved in an improper way, this error can occur.
To troubleshoot the format of the certificate, please see solution ID: SO1781
Option 3 - Incorrect Keystore being Used:
If a different Keystore is being used, than the Keystore that was used to generate the CSR that was submitted for the enrollment of the certificate, this error can occur.
If the correct Keystore to use is unknown or lost, a replacement of the certificate is needed. For instructions to replace the certificate, please see solution ID: SO1437
Please contact our support team if you have any additional problems or questions.