1CURLOPT_PROXY_SSLCERT_BLOB(3c)url_easy_setopt optionCsURLOPT_PROXY_SSLCERT_BLOB(3)
2
3
4
6 CURLOPT_PROXY_SSLCERT_BLOB - SSL proxy client certificate from memory
7 blob
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT_BLOB,
13 struct curl_blob *blob);
14
16 Pass a pointer to a curl_blob structure, which contains information
17 (pointer and size) about a memory block with binary data of the cer‐
18 tificate used to connect to the HTTPS proxy. The format must be "P12"
19 on Secure Transport or Schannel. The format must be "P12" or "PEM" on
20 OpenSSL. The string "P12" or "PEM" must be specified with CUR‐
21 LOPT_PROXY_SSLCERTTYPE(3).
22
23 If the blob is initialized with the flags member of struct curl_blob
24 set to CURL_BLOB_COPY, the application does not have to keep the buffer
25 around after setting this.
26
27 This option is an alternative to CURLOPT_PROXY_SSLCERT(3) which instead
28 expects a file name as input.
29
31 NULL
32
34 All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
35
37 CURL *curl = curl_easy_init();
38 if(curl) {
39 struct curl_blob blob;
40 blob.data = certificateData;
41 blob.len = filesize;
42 blob.flags = CURL_BLOB_COPY;
43 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
44 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
45 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
46 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
47 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
48 ret = curl_easy_perform(curl);
49 curl_easy_cleanup(curl);
50 }
51
53 Added in libcurl 7.71.0. This option is supported by the OpenSSL,
54 Secure Transport and Schannel backends.
55
57 Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
58 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
59
61 CURLOPT_PROXY_SSLCERTTYPE(3), CURLOPT_PROXY_SSLKEY(3), CUR‐
62 LOPT_PROXY_SSLCERT(3),
63
64
65
66libcurl 7.71.0 24 Jun 2020 CURLOPT_PROXY_SSLCERT_BLOB(3)