cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to set the openssl certificate in android curl client

From: Guenter <lists_at_gknw.net>
Date: Thu, 11 Oct 2012 23:55:21 +0200

Hi,
Am 11.10.2012 18:10, schrieb Indtiny s:
> Here with I have put my curl setoption code , and in that I am just
> trying to read the certificates from sdcard
> below are the curl set option I tried to set the certs
>
> curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"DER");
> curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,"DER")
> curl_easy_setopt(curl,CURLOPT_SSLCERT,/sdcard/sslcerts/mycert.der);
> curl_easy_setopt(curl,CURLOPT_SSLKEY,/sdcard/sslcerts/mykey.der);
you still use DER format here - but I think we told you already that
libcurl supports only PEM ...
> curl_easy_setopt(curl,CURLOPT_CAINFO,/sdcard/sslcerts/mycacert.root);
> curl_easy_setopt(curl,CURLOPT_CAPATH,/sdcard/sslcerts/);
I doubt that /sdcard will work since its in most cases FAT-formatted;
I'm not sure but its very well possible that OpenSSL checks for file
permission 600 or such, and that will fail on FAT; place your certs on
EXT3/EXT4, f.e. /data/local/tmp or so ...

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-11