Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to hit https url with curl. For this it asking SSL certificate. To ignore this I supposed to use -k or --insecure option with curl command. But by mistake, I forgot to give this option in my project code. So got below error.

============================ Error ====================================
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
======================== Error End ========================================


Here the problem is I released my project so I can't do anything from my project side. But this URL should be hit without the change in code. Can we do anything from the server side, means any possibility to change server setting to ignore SSL certificate verification. The server is Windows 2012 R2. Can you please provide me any solution for this.

What I have tried:

The below is curl hitting which I have used in my code. So my server(Windows 2012 R2) should allow below.

curl --connect-timeout 60 -m 60 <my URL>
Posted
Comments
Richard Deeming 7-Dec-18 10:05am    
Update your site so that it has a valid SSL certificate.

There are various tools you can use to verify your site - for example, https://www.ssllabs.com/ssltest/[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900