summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorGilles Vollant <info@winimage.com>2020-07-13 03:17:56 +0200
committerJay Satiro <raysatiro@yahoo.com>2021-05-05 02:29:16 -0400
commit77fc3859b24470b5c173174e2aba3b099b92adfd (patch)
tree010c3dfb572cd78b1b88187bb5dfc4200eeb1638 /lib/url.c
parent70cf50fb4aa5e55ca2e732716a4f455d39192088 (diff)
downloadcurl-77fc3859b24470b5c173174e2aba3b099b92adfd.tar.gz
SSL: support in-memory CA certs for some backends
- New options CURLOPT_CAINFO_BLOB and CURLOPT_PROXY_CAINFO_BLOB to specify in-memory PEM certificates for OpenSSL, Schannel (Windows) and Secure Transport (Apple) SSL backends. Prior to this change PEM certificates could only be imported from a file and not from memory. Co-authored-by: moparisthebest@users.noreply.github.com Ref: https://github.com/curl/curl/pull/4679 Ref: https://github.com/curl/curl/pull/5677 Ref: https://github.com/curl/curl/pull/6109 Closes https://github.com/curl/curl/pull/6662
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 0697f75d0..74ebb6f91 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3738,6 +3738,7 @@ static CURLcode create_conn(struct Curl_easy *data,
data->set.ssl.primary.pinned_key =
data->set.str[STRING_SSL_PINNEDPUBLICKEY];
data->set.ssl.primary.cert_blob = data->set.blobs[BLOB_CERT];
+ data->set.ssl.primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
data->set.ssl.primary.curves = data->set.str[STRING_SSL_EC_CURVES];
#ifndef CURL_DISABLE_PROXY
@@ -3753,6 +3754,8 @@ static CURLcode create_conn(struct Curl_easy *data,
data->set.proxy_ssl.primary.pinned_key =
data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
data->set.proxy_ssl.primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
+ data->set.proxy_ssl.primary.ca_info_blob =
+ data->set.blobs[BLOB_CAINFO_PROXY];
data->set.proxy_ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
data->set.proxy_ssl.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
data->set.proxy_ssl.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];