Skip to content

Instantly share code, notes, and snippets.

@non7top
Last active January 27, 2017 15:01
Show Gist options
  • Save non7top/f7e6893a9feb72d4579cc2a3ae92d4c8 to your computer and use it in GitHub Desktop.
Save non7top/f7e6893a9feb72d4579cc2a3ae92d4c8 to your computer and use it in GitHub Desktop.
Dump remote site certificate
#!/bin/bash
SITE=${1}
openssl s_client -connect ${SITE}:443 -servername $SITE </dev/null 2>/dev/null | openssl x509 -outform PEM > $SITE.pem
echo saved as $SITE.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment