Thursday, October 13, 2011

Openssl commands

- Create X509 certificate:
openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem -out testkey.pem -subj '/CN=mytestkey'

- Create a private key from Cert:
openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM

- Create public key from Cert:
openssl rsa -in exokey.pem -pubout

- To just output the public part of a private key:
openssl rsa -in key.pem -pubout -out pubkey.pem

No comments:

Post a Comment