Skip to content

Instantly share code, notes, and snippets.

@fxrobin
Created August 5, 2021 21:57
Show Gist options
  • Select an option

  • Save fxrobin/c1de7135fd107d5f81f2ac8954d3e15d to your computer and use it in GitHub Desktop.

Select an option

Save fxrobin/c1de7135fd107d5f81f2ac8954d3e15d to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "extracting $1:$2 to $1.pem"
openssl s_client -showcerts -connect $1:$2 </dev/null 2>/dev/null|openssl x509 -outform PEM >$1.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment