Here is a short manual for OpenSSL.
openssl req -out newkey.csr -new -newkey rsa:[bits] -nodes -keyout priv.key
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:[bits] -keyout priv.key -out cert.crt
openssl x509 -x509toreq -in cert.crt -out newreq.csr -signkey priv.key
openssl req -out oldkey.csr -key priv.key -new
openssl req -new -x509 -extensions v3_ca -keyout ca.key -out ca.crt -days [days valid]
openssl dhparam -out dhparam.pem [bits]
openssl req -text -noout -verify -in oldreq.csr
openssl rsa -in priv.key -check
openssl x509 -in cert.crt -text -noout
openssl pkcs12 -info -in key.pfx
openssl x509 -outform der -in cert.pem -out cert.der
openssl x509 -inform der -in cert.cer -out cert.pem
openssl pkcs12 -in key.pfx -out key.pem -nodes
openssl pkcs12 -export -out cert.pfx -inkey priv.key -in cert.crt -certfile ca.crt
openssl enc -h
openssl aes-256-cbc -salt -in priv.txt -out priv.txt.enc
openssl aes-256-cbc -d -in priv.txt.enc -out priv.txt.new
openssl aes-256-cbc -a -salt -in priv.txt -out priv.txt.enc
openssl aes-256-cbc -a -d -in priv.txt.enc -out priv.txt.new
openssl s_client -showcerts -connect www.example.com:443
openssl s_client -showcerts -starttls imap -connect mail.eample.com:139
openssl s_client -showcerts -starttls xmpp -connect chat.example.com:5222
openssl s_client -showcerts -cert cert.crt -key cert.key -connect www.example.com:443
openssl verify -verbose -CAFile ca.crt cert.crt
openssl x509 -modulus -noout -in cert.crt | openssl md5
openssl rsa -modulus -noout -in priv.key | openssl md5
Unless otherwise specified, the contents of this website are (C)Copyright Michael Paquier 2010-2023 and are licensed for use under CC BY-SA 3.0.