Skip to content

Instantly share code, notes, and snippets.

@fornellas
Created February 23, 2016 15:37
Show Gist options
  • Save fornellas/b48fb0bb924380ffeac7 to your computer and use it in GitHub Desktop.
Save fornellas/b48fb0bb924380ffeac7 to your computer and use it in GitHub Desktop.
OpenSSL
DOMAIN=example.com
PORT=443
echo | openssl s_client -connect $DOMAIN:$PORT 2>&1 | gawk '/-----BEGIN CERTIFICATE-----/{S=1}{if(S)print}/-----END CERTIFICATE-----/{exit}' > $DOMAIN.cer
openssl verify -CApath $DOMAIN.cer CA.cer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment