Ask a Question

Solution ID : SO8160

Last Modified : 05/02/2018

"Error: "java.lang.Exception: Input not an X.509 certificate" due to not using the original alias during install"

Problem

Error: "keytool error: java.lang.Exception: Input not an X.509 certificate"
Error: "Input not an X.509 certificate" when trying to import my JavaSoft certificate into the keystore.
Error occurs when importing JavaSoft certificate into the Key store

Cause

This error can occur for two reasons:The incorrect alias was specified while trying to import the certificate.No alias was specified while trying to import the certificate.

Solution

You receive the error message, "java.lang.Exception: Input not an X.509 certificate", due to not using the original alias during installation. Do the following;

Use the following syntax while performing the import function:

keytool -import -trustcacerts -alias (alias name) -file (name of certificate file) -keypass (key password) -keystore ( keystore name) -storepass (keystore password)