Feature request: passing ssl certificate and/or key parameter as content, not path
Date: Thu, 10 Oct 2019 10:48:46 -0400
Hello,
According to the libcurl documentation [1], if you want to specify a SSL
certificate or key to the connection, the parameter must be a file path
rather than the certificate or key value: "Pass a pointer to a zero
terminated string as parameter. The string should be the file name of
your client certificate."
This makes it difficult to use ssl authenticated requests on an embedded
program where those options can come from various places (API response,
config file, self-generated, whatever). The only workaround I find is to
use mkstemp, which adds layers of complexity.
Would it be possible to add the possibility to pass the cert/key content
as well? By adding a new value to CURLOPT_SSLCERTTYPE for example, like
"PEM_DATA"?
I can work on a patch but I'd like to know first if the idea would be
accepted.
/Nicolas
[1] - https://curl.haxx.se/libcurl/c/CURLOPT_SSLCERT.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-10-10