Created
April 25, 2022 17:39
-
-
Save r0mdau/98d16ae77f4761965d3db2f9c76e037f to your computer and use it in GitHub Desktop.
Get the CA for curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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