Skip to content

Instantly share code, notes, and snippets.

@artbikes
Created October 15, 2013 20:31
Show Gist options
  • Save artbikes/6998193 to your computer and use it in GitHub Desktop.
Save artbikes/6998193 to your computer and use it in GitHub Desktop.
retrieve ssl cert info
#!/bin/sh │
# │
# usage: retrieve-cert.sh remote.host.name [port] │
# │
REMHOST=$1 │
REMPORT=${2:-443} │
echo |\ │
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 │
#openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\ │
#sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment