Page 1 of 1

How to verify HTTPS url

Posted: Thu Apr 09, 2015 2:20 am
by srinivasmcs
Hi,

Any one can you please explain how to verify, and send https url using curl_setopt.

Re: How to verify HTTPS url

Posted: Thu Apr 09, 2015 10:43 am
by Christopher
You just need to set the protocol to HTTPS in the URL (CURLOPT_URL). If you have problems with some some certificates, you can add certificate authority information using:

CURLOPT_CAINFO "/path/to/my/cacert.pem"

If you absolutely cannot get it to authorize, you can test if it is a certificate/authority issue by doing:

CURLOPT_SSL_VERIFYPEER false,

If that works, then track down the problem with the certificate/authority, fix it, and set CURLOPT_SSL_VERIFYPEER back to true.