Hacker symbol

February 10, 2021 ~ 1 min read

Trusting cURL with Self Signed Certs


Curl can be told to trust self signed certificates.

First, download the certificate:

openssl s_client -showcerts -servername localhost -connect localhost:443 > cacert.pem

You can press Ctrl-c if the task doesn't end.

Second:

curl -v https://localhost/hello --cacert cacert.pem

Use the --cacert command option flag.


Sebastian BolaƱos

Hi, I'm Sebastian. I'm a software developer from Costa Rica. You can follow me on Twitter. I enjoy working on trustless systems.