Skip to content

Instantly share code, notes, and snippets.

@jkullick
Last active January 17, 2017 15:02
Show Gist options
  • Save jkullick/e3c335fa12db56f2d5e5c63fd3f5e00c to your computer and use it in GitHub Desktop.
Save jkullick/e3c335fa12db56f2d5e5c63fd3f5e00c to your computer and use it in GitHub Desktop.
Download SSL Certificate from Website
openssl s_client -connect $HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM > cert.pem

– or –

echo "GET" | openssl s_client -connect smtp.gmail.com:995 -showcerts | sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment