I made a new PR #4371, to allow application using libcurl with a pkcs12 SSL
client certificate in memory instead file.

 

 <https://github.com/curl/curl/pull/4371>
https://github.com/curl/curl/pull/4371

 

We talked 3 year ago about this feature.

 

 <https://curl.haxx.se/mail/lib-2016-08/0045.html>
https://curl.haxx.se/mail/lib-2016-08/0045.html

 

https://curl.haxx.se/mail/lib-2016-08/0050.html

 

So an application can just do this :

 

 

      void *certdata;

      size_t filesize;

 

      /* now fill certdata and filesize with pkcs12 certificate in memory */

      struct curl_blob structblob;

      curl_init_paramblob_struct_dup((&structblob),

                certdata, (size_t)filesize);

      my_setopt_str(curl, CURLOPT_SSLCERT, &structblob);    

 

For testing the API, the command line curl (when compiled with CURLDEBUG or
DEBUGBUILD macro) can be used with

--cert loadmem=cert.p12

 

This does exactly same jobs than

--cert cert.p12

But uses the new method.

 

PKCS12 certificate in memory is supported by schannel, sectransport (the
apple ssl layer) and openssl.

 

Modification from PR #4356 (which add of PKCS12 file for schannel
certificate) are merged in this PR. So if #4371 is merged in curl
repository, we can close #4356.

 

My other PR (#4346) : to use windows ca store with openssl is NOT included
in this PR and must be merged separately.

 

 

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to