<- Back

openssl

Local certificate file
Show certificate information from file
openssl x509 -text -noout -in certificate.crt
Print subject only
openssl x509 -subject -noout -in certificate.crt
Print enddate only
openssl x509 -enddate -noout -in certificate.crt
.p12 info
openssl pkcs12 [-nokeys] -info -in certificate.p12
.p12 enddate
openssl pkcs12 -in certificate.p12 -nodes | openssl x509 -noout -enddate
Remote server
Show certificate information from website
openssl s_client -showcerts -connect google.com:443 </dev/null 2>/dev/null
Save certificate from website
openssl s_client -showcerts -connect google.com:443 </dev/null 2>/dev/null | openssl x509 -outform PEM > certificate.crt
Save certificate from website (via wget)
wget https:/google.com:443 --ca-certificate=certificate.crt
Raw HTTP Request
Send http request to https server
cat request.http | ncat --ssl example.com 443