I'm trying to install a certificate into Tomcat 8 and am having trouble.
I've been given a Trustwave certificate in the form of:
I create a keystore with:
keytool -genkey -keystore c:\livecontent03.jks -alias livecontent03 -keyalg RSA -keysize 2048 -validity 3650
and fill out the answers with the details given to me although I leave the First name last name field blank as I was n't supplied these details.
I then import the CA certificate file "root certificate" with:
keytool -import -keystore c:\livecontent03.jks -trustcacerts -alias CACert -file c:\chain.cer -storepass ******
and then import the signed certificate:
keytool -import -keystore c:\livecontent03.jks -trustcacerts -alias livecontent03 -file c:\domainname.co.uk.cer -storepass ******
But at this point I get:
keytool error: java.lang.Exception: Public keys in reply and keystore don't match
I've spoken to Trustwave and they say that I should use "root certificate for Apache is STCA either from TEXT or PEM format"
So I tried again from scratch with stca.tx first before installing the domain.co.uk.cer but get the same error.
I'm now scratching my head and looking for advice.