keytool error: java.lang.Exception: Public keys in reply and keystore don't match

This is about how to import a SSL Certificate provided vendor to Tomcat Web Server.

Note: The CSR generated on Network balancer and the certificate is generated based on the provided CSR.

Can someone help me with the steps to how to import the certificate (.cer) to the tomcat server.

as i said the csr is generated on loadbalancer , I think it is conflicting. How to make the cert work and Import on tomcat?

1

1 Answer

  1. Firstly, using keytool utility have exported the private key

    keytool -v -importkeystore -srckeystore keystorefile.jks -srcalias alias -destkeystore exportedfilefile.p12 -deststoretype PKCS12
    openssl pkcs12 -in exportedfilefile.p12 -nocerts -nodes
  2. Secondly using open ssl , exported the .pfx file using the privatekey and .cert (servercertificate).

    openssl pkcs12 -export -out exportedfilename.pfx -inkey privatekey -in servercertificate.crt

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like