Extract the certificate
1 2 3 4 5 |
keytool -export -alias mykey -keystore mpestore.dat -file exported-der.crt openssl x509 -noout -text -in exported-der.crt -inform der openssl x509 -out exported-pem.crt -outform pem -in exported-der.crt -inform der |
Extract private key
1 2 3 4 5 6 |
mkdir t cd t wget http://www.source-code.biz/snippets/java/Base64Coder.java.txt wget http://mark.foster.cc/pub/java/ExportPriv.java javac ExportPriv.java Base64Coder.java java ExportPriv keystore alias password > exported-pkcs8.key |
See http://conshell.net/wiki/index.php/Keytool_to_OpenSSL_Conversion_tips