cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem related to SSL Peer verification

From: Ajeet kumar.S <ajeetkumar.s_at_jasmin-infotech.com>
Date: Mon, 22 Sep 2008 13:34:19 +0530

Dear All,

     I want to verify peer so I set in curl option like below:

     Here const char * pCACertFile = "cacert.pem";

     CURLcode ret;

 

    curl_easy_setopt(curl_handler, CURLOPT_CAINFO, pCACertFile);

    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);

    ret=curl_easy_perform(curl);

   But I got error some time like: CURLE_SSL_CACERT and
CURLE_SSL_CONNECT_ERROR respectively.

   I added our certificate in cacet.pem like below:

   

Jasmin CA Root

=============

-----BEGIN CERTIFICATE-----

MIICWjjKMCAgGlMA0GCSqGSIb3mjDQEBBAUAMHUxCzAVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsT

HkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEGAQABMA0GCSqGSIb3DQEBBAUAA4G

BAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l93PR2VX2

bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0PlZPvy5TYnh+dXIVtx6q

uTx8iC3/

-----END CERTIFICATE-----

 

Please tell me. How I can remove this error and adding the certificate in
cacert.pem is correct?

 

Thank you.

Regards,

--Ajeet Kumar Singh

 

 

 

image002.jpg
Received on 2008-09-22