Search code examples
javasslhttpscertificatetruststore

Export certificates from java?


We had some https certificates installed under java 5 keystore. I am looking forward to migrate my old ssl certificate from java 5 trustore to java 6 trustore or is it a good option to replace java 6 kdystore file wuth java 5 keystore file(though i wont prefer this)?


Solution

  • You can use:

    • keytool -list to find the alias of the certificate you want to migrate,
    • keytool -export -alias ... to export it into a file,
    • keytool -import ... to import it into the new trust store. (The default password is changeit, except on some versions of OSX where it's changeme).