cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: passing certificates for the cCURL with openssl in android

From: Indtiny s <indtiny_at_gmail.com>
Date: Sun, 23 Sep 2012 10:57:02 -0400

Hi,
I tried of using the libcurl on my linux pc (where my both server and
clients are running ) .. I tested the with extra setup at the client
side and it worked . (here I have compiled the curl code with
*openssl* support ) . below is the extra curl set opt I included in
the curl client side ..

 curl_easy_setopt(c, CURLOPT_URL, "https://www.site.com");
curl_easy_setopt(c, CURLOPT_CAINFO, "/path/to/the/selfsignedcertificate.crt");
curl_easy_setopt(curl,CURLOPT_SSL_CIPHER_LIST,"TLS_ECDHE_ECDSA_WITH_AES_128_CCM");

curl_easy_setopt(c, CURLOPT_SSL_VERIFYPEER, 1);

curl_easy_perform(c);
curl_easy_cleanup(c);

Now I am not finding any way to provide the path in android for my self
signed certificate .. I dont know where to put my keys and certificate at
the android and provide their paths . i tried by putting at the sdcard but
for that I got curl errors which I had put it in my initial post .

Rgds
Indu

On Fri, Sep 21, 2012 at 3:53 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 21 Sep 2012, Indtiny s wrote:
>
> Here I send my own cerificates from the server and server ask the client
>> to send the certificates .
>>
>
> Okay, so you speak of using a client certificate. It makes things easier
> if you specify which certificate you speak of.
>
>
> Therefore I need to load my own certificates at the android-ndk curl
>> client side
>>
>
> I suggest you first try to write such a libcurl-using application using
> plain standard Linux to get it running fine.
>
>
> --
>
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>

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