Skip to content

Instantly share code, notes, and snippets.

@immontilla
Last active September 30, 2018 08:02
Show Gist options
  • Save immontilla/ba49ae32d7e47115aad44a228a8ab73f to your computer and use it in GitHub Desktop.
Save immontilla/ba49ae32d7e47115aad44a228a8ab73f to your computer and use it in GitHub Desktop.
Verifying Let's Encrypt certificates via command line
################################################################
#Commands to check Let's Encrypt certificates status after renew
################################################################
#Concise - Its output is the expire date
echo | openssl s_client -connect blog.immontilla.eu:443 2>/dev/null | openssl x509 -noout -enddate
#Certificate main fields (subject, start date, expire date, issuer and status)
curl -v https://blog.immontilla.eu 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'
#(sh) Full verbose
echo | openssl s_client -showcerts -servername blog.immontilla.eu -connect blog.immontilla.eu:443 2>/dev/null | openssl x509 -inform pem -noout -text
#(Java) Full verbose
keytool -printcert -sslserver blog.immontilla.eu:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment