|
Problem
Error:
"keytool error: java.lang.Exception: Input not an X.509 certificate"
"Input not an X.509 certificate" when trying to import my Sun Java™ certificate into the keystore.
Error occurs when importing Sun Java™ certificate into the keystore.
Cause
This error occurs when one of the following conditions are true:
- The incorrect alias was specified during the import command.
- No alias was specified while trying to import the certificate.
- The incorrect keystore file was used during the import command.
- Improperly formatted certificate is being imported into the keystore.
Solution
To resolve this issue:
- Use the correct alias in your command.
- Verify that command points to the keystore using its exact name.
- Verify that certificate is formatted correctly. Open your certificate with a plain text editor (ie. notepad, vim):
- The header and footer are included enclosed between five dashes.
- There are no trailing spaces on each line.
- The certificate is saved as a .p7b.
- Use the following syntax while performing the import function:
Note: Where alias_name, is the alias of the private key in your keystore, keystore_name is the path to your keystore and keystore_output.txt the file that will be created.
You will be prompted to enter the keystore password.
Important: If you have forgotten your alias or need to verify your keystore details, refer to SO28992
Legacy ID
|
|


