<- Back
#security #ssl #certificates #pem #crt #https #openssl #step-cli #smallstep

tls

Show certificate information from website
via openssl
openssl s_client -showcerts -connect google.com:443 </dev/null 2>/dev/null
via step
step-cli certificate inspect --bundle https://google.com
Verify TLS certificate of host
ncat -vvv --ssl-verify google.com 443
Save certificate information from website to disk
via openssl
openssl s_client -showcerts -connect google.com:443 </dev/null 2>/dev/null | openssl x509 -outform PEM > certificate.crt
via step
step-cli certificate inspect --bundle --format pem https://google.com > certificate.crt
Show certificate information from file
via openssl
openssl x509 -text -noout -in certificate.crt
via step
step-cli certificate inspect certificate.crt --short --bundle
Send request to https server
ncat
cat request.http | ncat --ssl example.com 443

--bundle is used to store the whole certificate chain. If you are only interested in the server certificate itself, you can omit the parameter.