1CURLOPT_PROXY_SSLKEY_BLOB(3)curl_easy_setopt optionsCURLOPT_PROXY_SSLKEY_BLOB(3)
2
3
4
6 CURLOPT_PROXY_SSLKEY_BLOB - private key for proxy cert from memory blob
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY_BLOB,
12 struct curl_blob *blob);
13
15 Pass a pointer to a curl_blob structure that contains information
16 (pointer and size) about the private key for connecting to the HTTPS
17 proxy. Compatible with OpenSSL. The format (like "PEM") must be speci‐
18 fied with CURLOPT_PROXY_SSLKEYTYPE(3).
19
20 If the blob is initialized with the flags member of struct curl_blob
21 set to CURL_BLOB_COPY, the application does not have to keep the buffer
22 around after setting this.
23
25 NULL
26
28 All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
29
31 CURL *curl = curl_easy_init();
32 if(curl) {
33 struct curl_blob blob;
34 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
35 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
36 blob.data = certificateData;
37 blob.len = filesize;
38 blob.flags = CURL_BLOB_COPY;
39 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
40 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM");
41
42 blob.data = privateKeyData;
43 blob.len = privateKeySize;
44 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY_BLOB, &blob);
45 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
46 ret = curl_easy_perform(curl);
47 curl_easy_cleanup(curl);
48 }
49
51 Added in libcurl 7.71.0. This option is supported by the OpenSSL back‐
52 ends.
53
55 Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
56 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
57
59 CURLOPT_SSLKEYTYPE(3), CURLOPT_SSLKEY(3),
60
61
62
63libcurl 7.76.1 November 04, 2020 CURLOPT_PROXY_SSLKEY_BLOB(3)