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
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.
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)