Skip to content

Instantly share code, notes, and snippets.

@epcim
Created October 22, 2018 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/05a324f031773c8f3c71c20937595412 to your computer and use it in GitHub Desktop.
Save epcim/05a324f031773c8f3c71c20937595412 to your computer and use it in GitHub Desktop.
Get server certificate, curl + openssl
#!/bin/bash
export SERVER=${SERVER:-localhost}
echo | openssl s_client -showcerts -servername $SERVER -connect $SERVER:443 2>/dev/null | openssl x509 -inform pem -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment