cURL / Mailing Lists / curl-library / Single Mail

curl-library

Passing memory blocks instead of file names to curl_easy_setopt

From: Mayur Srinivasan <msrini1_at_gmail.com>
Date: Mon, 2 Aug 2010 15:30:47 -0700

Hi,
Is there a way to setup libcurl to use the root certificate, the client
certificate and the client key from memory buffers rather than files?
For example:
Instead of using file names, I'd like to pass in memory blocks:
curl_easy_setopt(m_curl_handle, CURLOPT_SSLCERT, m_pClientCert);
curl_easy_setopt(m_curl_handle, CURLOPT_SSLKEY, m_pClientKey);
curl_easy_setopt(m_curl_handle, CURLOPT_CAINFO, m_pClientRootCert);

I tried this, I get the error: unable to use client certificate (no key
found or wrong pass phrase?)
The same APIs work if I use file names.

Help please?

Thanks
MS

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-03