1CURLOPT_PROXY_CAPATH(3) curl_easy_setopt options CURLOPT_PROXY_CAPATH(3)
2
3
4
6 CURLOPT_PROXY_CAPATH - directory holding HTTPS proxy CA certificates
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);
12
14 Pass a char * to a null-terminated string naming a directory holding
15 multiple CA certificates to verify the HTTPS proxy with. If libcurl is
16 built against OpenSSL, the certificate directory must be prepared using
17 the openssl c_rehash utility. This makes sense only when CUR‐
18 LOPT_PROXY_SSL_VERIFYPEER(3) is enabled (which it is by default).
19
20 The application does not have to keep the string around after setting
21 this option.
22
24 NULL
25
27 Everything used over an HTTPS proxy
28
30 CURL *curl = curl_easy_init();
31 if(curl) {
32 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
33 /* using an HTTPS proxy */
34 curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
35 curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
36 ret = curl_easy_perform(curl);
37 curl_easy_cleanup(curl);
38 }
39
41 Added in 7.52.0
42
43 This option is supported by the OpenSSL, GnuTLS, and mbedTLS (since
44 7.56.0) backends. The NSS backend provides the option only for backward
45 compatibility.
46
48 CURLE_OK if supported; or an error such as:
49
50 CURLE_NOT_BUILT_IN - Not supported by the SSL backend
51
52 CURLE_UNKNOWN_OPTION
53
54 CURLE_OUT_OF_MEMORY
55
57 CURLOPT_PROXY_CAINFO(3), CURLOPT_CAINFO(3), CURLOPT_PROXY_SSL_VERIFY‐
58 HOST(3), CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
59
60
61
62libcurl 7.82.0 November 26, 2021 CURLOPT_PROXY_CAPATH(3)