Skip to content

Instantly share code, notes, and snippets.

@vdakalov
Created September 5, 2018 03:59
Show Gist options
  • Save vdakalov/b4d8f1835a96902cbae49e15cf3f474c to your computer and use it in GitHub Desktop.
Save vdakalov/b4d8f1835a96902cbae49e15cf3f474c to your computer and use it in GitHub Desktop.
Retrieve ssl certificate from website
# @see https://serverfault.com/questions/129503/save-remote-ssl-certificate-via-linux-command-line
sudo bash -c "openssl s_client -servername remote.server.net -connect remote.server.net:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /usr/local/share/ca-certificates/my-cert.crt"
# @see https://thomas-leister.de/en/how-to-import-ca-root-certificate/
sudo update-ca-certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment