The bellow error occurs while importing a Sun Java certificate into a Keystore:
keytool error: java.lang.Exception: Input not an X.509 certificate
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.