Skip to content

Instantly share code, notes, and snippets.

@mintsoft
Created July 10, 2013 10:29
Show Gist options
  • Select an option

  • Save mintsoft/5965253 to your computer and use it in GitHub Desktop.

Select an option

Save mintsoft/5965253 to your computer and use it in GitHub Desktop.
Inspect Remote SSL Certificate using openssl
#!/bin/bash
[[ -n "${1}" ]] && openssl x509 -in <( echo "GET /" | openssl s_client -connect ${1}:443 2>&1 | grep -A 65535 'Server certificate' | tail -n+2 | grep -B 65535 'END CERTIFICATE' ) -noout -text -purpose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment