I'm configuring tomcat to use SSL/TLS1.2.
'keytool -genkey -keysize 2048 -keying RSA -alias hostname -keystore tomcat.jks'
I provided the required details and passcode to create the keystore.
I changed the keystore to pcks12
keytool -importkeystore -srckeystore tomcat.jks -destkeystore tomcat.p12 -deststoretype pkcs12
Generated the certificate signing request
'keytool –keystore tomcat.p12 –certreq –alias hostname –keyalg rsa –file tomcat.csr'
Imported the ssl certificate with passcode
keytool -importcert -file sslcert.pfx -alias hostname -keystore tomcat.p12 -storepass Xxxxxxxx
During the 4th step I got the error "keytool error: java.security.cert.CertificateParsingException: Signed fields invalid". The ssl certificate has its own password but not sure where the parsing error is. Any advice
Converting the pfx certificate into .pem fixed the issue. The certificate was converted using the below
openssl pkcs12 -in sslcert.pfx -out sslcert.pem -nodes