Skip to content

Instantly share code, notes, and snippets.

@r0mdau
Created April 25, 2022 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r0mdau/98d16ae77f4761965d3db2f9c76e037f to your computer and use it in GitHub Desktop.
Save r0mdau/98d16ae77f4761965d3db2f9c76e037f to your computer and use it in GitHub Desktop.
Get the CA for curl
# 1 get the cert
echo quit | openssl s_client -showcerts -servername server -connect example.com:443 > example.com.pem
# 2 use it in curl command to test it
curl --cacert example.com.pem https://example.com
# 3 add it to your certificates store (Debian)
sudo mv example.com.pem /usr/share/ca-certificates/example.com.crt
# 4 update the store
sudo dpkg-reconfigure ca-certificates
# 4 bis
sudo update-ca-certificates --fresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment