Skip to content

Instantly share code, notes, and snippets.

@ralavay
Last active December 28, 2018 08:17
Show Gist options
  • Select an option

  • Save ralavay/d0b799eb2e68c498015165df301e5602 to your computer and use it in GitHub Desktop.

Select an option

Save ralavay/d0b799eb2e68c498015165df301e5602 to your computer and use it in GitHub Desktop.

Revisions

  1. ralavay revised this gist Dec 28, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cert-check.sh
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@
    # cert-check www.google.com

    function cert-check() {
    yes QUIT | openssl s_client -showcerts -servername $1 -connect $1:443 > /tmp/$1.pem && openssl x509 -inform PEM -in /tmp/$1.pem -text -out certdata | grep -i 'not after'
    yes QUIT | openssl s_client -showcerts -servername $1 -connect $1:443 > /tmp/$1.pem && openssl x509 -inform PEM -in /tmp/$1.pem -text -out certdata | grep -i 'not after'
    }
  2. ralavay created this gist Dec 28, 2018.
    9 changes: 9 additions & 0 deletions cert-check.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Put this into ~/.profile
    # Usage:
    # cert-check domain.name
    # Example:
    # cert-check www.google.com

    function cert-check() {
    yes QUIT | openssl s_client -showcerts -servername $1 -connect $1:443 > /tmp/$1.pem && openssl x509 -inform PEM -in /tmp/$1.pem -text -out certdata | grep -i 'not after'
    }