Skip to content

Instantly share code, notes, and snippets.

@yowcow
Created February 2, 2018 01:05
Show Gist options
  • Save yowcow/1a6ac7962cb9c3a26049dfbee84d051f to your computer and use it in GitHub Desktop.
Save yowcow/1a6ac7962cb9c3a26049dfbee84d051f to your computer and use it in GitHub Desktop.
Show SSL certificate
#
# https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools
#
HOST = github.com
PORT = 443
all:
echo | \
openssl s_client -showcerts -servername $(HOST) -connect $(HOST):$(PORT) 2>/dev/null | \
openssl x509 -inform pem -noout -text
.PHONY: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment