1CURLOPT_PROXY_SSLKEY(3) curl_easy_setopt options CURLOPT_PROXY_SSLKEY(3)
2
3
4
6 CURLOPT_PROXY_SSLKEY - private keyfile for HTTPS proxy client cert
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY, char *keyfile);
12
14 Pass a pointer to a null-terminated string as parameter. The string
15 should be the file name of your private key used for connecting to the
16 HTTPS proxy. The default format is "PEM" and can be changed with CUR‐
17 LOPT_PROXY_SSLKEYTYPE(3).
18
19 (iOS and Mac OS X only) This option is ignored if curl was built
20 against Secure Transport. Secure Transport expects the private key to
21 be already present in the keychain or PKCS#12 file containing the cer‐
22 tificate.
23
24 The application does not have to keep the string around after setting
25 this option.
26
28 NULL
29
31 All
32
34 CURL *curl = curl_easy_init();
35 if(curl) {
36 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
37 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
38 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
39 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
40 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
41 ret = curl_easy_perform(curl);
42 curl_easy_cleanup(curl);
43 }
44
46 Added in 7.52.0
47
48 If built TLS enabled.
49
51 Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
52 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
53
55 CURLOPT_PROXY_SSLKEYTYPE(3), CURLOPT_PROXY_SSLCERT(3), CURLOPT_SSLKEY‐
56 TYPE(3), CURLOPT_SSLCERT(3),
57
58
59
60libcurl 7.82.0 November 26, 2021 CURLOPT_PROXY_SSLKEY(3)