Skip to content

Instantly share code, notes, and snippets.

@xpl0t
Last active May 17, 2022 07:49
Show Gist options
  • Save xpl0t/d7073e809622d329089716fc72e62a43 to your computer and use it in GitHub Desktop.
Save xpl0t/d7073e809622d329089716fc72e62a43 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Downloads the public certificate of the certificate authority
echo quit | openssl s_client -showcerts -servername example.com -connect example.com:443 2> /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){c=""};c=c $0 "\n"}END{print c}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment