Skip to content

Instantly share code, notes, and snippets.

@niltonvasques
Created March 7, 2016 21:17
Show Gist options
  • Select an option

  • Save niltonvasques/648ae2474e0743869b05 to your computer and use it in GitHub Desktop.

Select an option

Save niltonvasques/648ae2474e0743869b05 to your computer and use it in GitHub Desktop.
Download SSL Certificate from Terminal
#!/bin/bash
# $1 - HOST
echo -n | openssl s_client -connect $1:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/$1.cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment