Handy OpenSSL Commands
To convert a certificate from PEM to DER:
- openssl x509 -in cert.txt -inform PEM -out cert.bin -outform DER
- openssl x509 -in cert.bin -inform DER -out cert.txt -outform PEM
- openssl rsa -in key.txt -inform PEM -out key.bin -outform DER
- openssl rsa -in key.bin -inform DER -out key.txt -outform PEM
- openssl pkcs12 -export -out client.pfx -inkey keyfile.txt -in cert.txt -certfile root.txt
- openssl pkcs12 -in client.pfx -nocerts -out keyfile.txt
- openssl pkcs12 -in client.pfx -clcerts -nokeys -out cert.txt
- openssl rsa -in keyfile.txt -out unpassworded.txt
- openssl genrsa -out client.key 4096
- openssl req -key client.key -new -out client.req
- openssl req -new -newkey rsa:2048 -nodes -keyout key.txt -out certreq.txt -days 3650
- openssl x509 -text -in cert.txt
- openssl s_client -connect your.ssl.site:443 -CApath c:\rootcerts -cert test.cer -key test.key
Thanks to the following internet sources for their contributions to this document
Comments
Post a Comment