cURL / Mailing Lists / curl-library / Single Mail


SSL Certificate and SSL KeyProblem

From: Ajeet kumar.S <>
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

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

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.


--Ajeet Kumar Singh


Received on 2008-08-16