cURL / Mailing Lists / curl-library / Single Mail

curl-library

SSL Certificate and SSL KeyProblem

From: Ajeet kumar.S <ajeetkumar.s_at_jasmin-infotech.com>
Date: Sat, 16 Aug 2008 19:32:11 +0530

Dear All,

   Thanks allot for Your help. I am trying to solve issue related to
curl_got_nothing. I am communicating through https

To streaming server So set curl option as follows:

 

CURL *curl;

curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE,"PEM");

curl_easy_setopt(curl, CURLOPT_SSLCERT, cert);

curl_easy_setopt(curl, CURLOPT_SSLKEY, key );

curl_easy_setopt(curl, CURLOPT_KEYPASSWD, pass);

              

here cert, key are file name of certificate and key which stored in hard
disk.

Curl is going to read from hard disk at run tilme of programme.

If instead of putting file name of certificate and key. Can we pass
buffer[charector array] pointer where this certificate and key are stored.
Actually I want to pass char buffer pointer.I stored this key and
certificate in separate buffer and pass in curl option. But I got response
curl_ssl_Cert_Problem.

Please tell me how to pass buffer pointer instead of file name.

I set option given below:

 

 

Char cert_buffer[2048]; //Here I stored certificate

Char key_buffer[2048];// Here I stored Key

curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE,"PEM");

curl_easy_setopt(curl, CURLOPT_SSLCERT, cert_buffer);

curl_easy_setopt(curl, CURLOPT_SSLKEY, key_buffer );

curl_easy_setopt(curl, CURLOPT_KEYPASSWD, pass);

 

 Please reply me.

Thank you.

Regards,

--Ajeet Kumar Singh

 

 
Received on 2008-08-16