Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
codingoutloud / make-keys.bat
Last active Jun 13, 2020
Handy OpenSSL command-line combinations I've used - they might've been hard to find or come up with, so capturing them here.
View make-keys.bat
@echo off
if _%1_==__ goto USAGE
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=My Cert Name"
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:%1
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
openssl pkcs12 -in mycert.pfx -nodes -passin pass:%1 | openssl x509 -noout -fingerprint
openssl x509 -in mycert.pem -noout -fingerprint
You can’t perform that action at this time.