Tuesday, July 3, 2007

Convert Cert between PEM and keytool

I have been using CERT for a while. I mainly knew IBM keyman tool to do the cert related tasks. recently I exposed to opensource environment. I just realized the powerful openssl and the diference between cert format:
apache is using PEM based cert, while others may use java keytool ( for instance WebSphere Application Server Community edition), I was able to porting cert from keytool into apache by following a good web reference doc : http://mark.foster.cc/kb/openssl-keytool.html
1.1 keytool export cert
1.2 use exportPriv to export private key
1.3 use openssl verify command to verify my exported cert
1.4 use openssl s_server -cert server.crt -key private.key -www to test whether the cert and key works. the command will open port 4433 for https accessing

No comments: