Ignore SSL warnings in curl
Sometimes your testing scenario or cycle is so far ahead of your infrastructure that you don’t even have time or opportunity to procure proper SSL certificates for you website.
If there’s a certificate missing or expired, or a domain name mismatch in the certificate of the website you’re connecting to, most of browsers and command line tools will warn you.
For instance, curl will show you something like this:
If you really know what you’re doing, it’s possible to ignore SSL warnings and attempt to download the content anyway.
WARNING: by really knowing what you’re doing I mean understanding of what SSL errors mean. For instance, the one above is suggesting that webserver doesn’t have a domain like unixtutorial.test in its certificates – so even though the download may succeed, we’ll probably get wrong content (some other website’s content).
How To Make curl Ignore SSL Warnings Specify the –insecure option for curl and it will ignore the SSL warnings and download the content anyway:
As I predicted, the webserver returned content, but it’s actually a “Not Found” page because there’s no such website (unixtutorial.test is a fictitious domain) found.
That’s it for today!