curl_easy_setopt with CURLOPT_SSLCERT_BLOB seems not to work. #6816
I did this
curl_easy_setopt with CURLOPT_SSLCERT_BLOB seems not to work.
58: unable to set private key file: '(memory blob)' type PEM
I expected the following
The key is used.
7.76.0 from today.
Darwin MyMac.lan 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
I put some debug code in SSL_CTX_use_PrivateKey_bio:
and the output is:
So while it shows clearly for us in l our log above, the length is > 6000 for the PEM, but at point of PEM_read_bio_PrivateKey, the length is zero! And Openssl can't find the --- BEGIN in the PEM.
I added logging for the created BIO object and it has the size:
So somewhere between that and the later point the length is lost, and internal pointer changes!
see curl#6816 and alternate fix 6817