curl-library
Re: Using custom ssl certificate from memory
Date: Sun, 9 Mar 2014 13:40:42 +0700
Yes I´ve tried that.
*... your source code formatting in a text-only mail client is a bit hard
to parse...*
how to format it better?
On 5 March 2014 23:14, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 4 Mar 2014, Ruslan Gaifulin wrote:
>
> I created a bundle with mk-ca-bundle named C:\mybundle.cer
>> I check it like
>> curl_easy_setopt(curl, CURLOPT_CAINFO, "C:\\mybundle.cer");
>> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true);
>>
>
> I advice you to instead pass a 1L as argument. "true" is not necessarily a
> long set to 1.
>
>
> And was able to login to the server. Now I need to use certificate info
>> from memory i.e. with
>>
>
> You thus want the CA cert from memory (just saying "ssl certificate" is a
> bit vague and ambigious). Did you try the example showing this?
>
> http://curl.haxx.se/libcurl/c/cacertinmem.html
>
> *static CURLcode sslctx_function(CURL * curl, void * sslctx, void *
>>
>> parm){ X509_STORE * store; X509 * cert=NULL; BIO * bio;
>> std::fstream myfile; myfile.open("C:\\certdata"); std::string
>> certText; std::string line; while(std::getline(myfile, line))
>>
>
> ... your source code formatting in a text-only mail client is a bit hard
> to parse...
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-- Cheers, Ruslan Gaifulin <O.Yurchenko_at_omsk.otpbank.ru>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-09