cURL / Mailing Lists / curl-library / Single Mail

curl-library

easier way to set the CA PEM file as a string for libcurl?

From: Bram de Jong <bram.dejong_at_native-instruments.de>
Date: Fri, 07 Feb 2014 16:54:47 +0100

Hi Everyone,

First post here, don't shoot me for asking what has probably been asked
for before.

Looking into usage of Lib-CURL for Http(s) calls ( surprise! ;) ). I got
the https peer SSL Certificate Verification working just fine with an
on-disk PEM file and I know about CURLOPT_SSL_CTX_FUNCTION. And yes, I
have seen http://stackoverflow.com/a/11004911 :-)

However my question is: wouldn't it be awesome to have a slightly easier
way to set the *content* of a PEM file or just one certificate as a
string instead of having to point to it on the file system?

I would even think that giving a file pointer would be just as good as
it would allow the usage of an memory-mapped-file rather than an on-disk
one - but this might be harder (/impossible?) with the current interface (?)

I understand that using CURLOPT_SSL_CTX_FUNCTION this would be possible,
but not knowing enough about OpenSSL means I will probably mess up.

Greetings,

  - Bram

-- 
Bram de Jong
Senior Developer
Native Instruments GmbH
+49-30-611035-1845
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-07