OpenSSL hacks

Quick command snippets for managing an SSL CA:

Generating a private key:

openssl genrsa -des3 -out www.mananet.net.key 2048

Generating a CRL:

openssl req -new -key www.mananet.net.key -out www.mananet.net.csr -days 3650 -sha256

Signing:

openssl ca -in www.mananet.net.csr -out www.mananet.net.pem -config /root/ca/config.txt

Generating a pfx file for windows:

openssl pkcs12 -export -out www.mananet.net.pfx -inkey www.mananet.net.key -in www.mananet.net.pem

Revoking a certificate:

openssl ca -revoke /root/ca/newcerts/0E.pem -config /root/ca/config.txt