Skip to content

Instantly share code, notes, and snippets.

@kckrinke
Created October 24, 2016 18:02
Show Gist options
  • Save kckrinke/5f7c38a2777c6747ef355a19f5929098 to your computer and use it in GitHub Desktop.
Save kckrinke/5f7c38a2777c6747ef355a19f5929098 to your computer and use it in GitHub Desktop.
Another way of retrieving SSL (public) certificate from a remote host
#!/bin/bash
if [ $# -ne 1 ]
then
echo "usage: $(basename $0) host:port"
exit 1
fi
openssl x509 -in <(openssl s_client -connect "$1" -prexit 2>/dev/null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment