Dans Dev Diary 2.0 Help

OpenSSL Common Commands

To get the SSL certificate from a website along with the chain, use the following command:

openssl s_client -showcerts -connect $DOMAIN:$PORT

Extract the SSL certificate from the chain, use the following command:

openssl s_client -connect $DOMAIN:$PORT < /dev/null 2>/dev/null | openssl x509 -outform PEM >/etc/ssl/mycert.pem
Last modified: 15 January 2024