Skip to content

Instantly share code, notes, and snippets.

@xee5ch
Created July 3, 2013 12:53
Show Gist options
  • Save xee5ch/5917639 to your computer and use it in GitHub Desktop.
Save xee5ch/5917639 to your computer and use it in GitHub Desktop.
Bashism with OpenSSL s_client to download SSL cert and process cert to get expiry date.
SSLHOST=domain.tld
SSLPORT=443
echo "" | openssl s_client -connect $SSLHOST:$SSLPORT 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' |openssl x509 -text|grep "Not After :"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment