Skip to content

Instantly share code, notes, and snippets.

@b4tman
Created October 8, 2024 09:06
Show Gist options
  • Save b4tman/64c7a801969b461a3e1e2096f17be694 to your computer and use it in GitHub Desktop.
Save b4tman/64c7a801969b461a3e1e2096f17be694 to your computer and use it in GitHub Desktop.
#!/bin/sh
export HOST=example.com
export PORTNUMBER=443
export SERVERNAME=example.com
echo -n | openssl s_client -connect $HOST:$PORTNUMBER -servername $SERVERNAME | openssl x509 > $SERVERNAME.cer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment