1CURLOPT_PROXY_CAPATH(3)    curl_easy_setopt options    CURLOPT_PROXY_CAPATH(3)
2
3
4

NAME

6       CURLOPT_PROXY_CAPATH - directory holding HTTPS proxy CA certificates
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);
12

DESCRIPTION

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
23       The default value for this can be figured out with CURLINFO_CAPATH(3).
24

DEFAULT

26       NULL
27

PROTOCOLS

29       Everything used over an HTTPS proxy
30

EXAMPLE

32       CURL *curl = curl_easy_init();
33       if(curl) {
34         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
35         /* using an HTTPS proxy */
36         curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
37         curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
38         ret = curl_easy_perform(curl);
39         curl_easy_cleanup(curl);
40       }
41

AVAILABILITY

43       Added in 7.52.0
44
45       This option is supported by the OpenSSL,  GnuTLS,  and  mbedTLS  (since
46       7.56.0) backends. The NSS backend provides the option only for backward
47       compatibility.
48

RETURN VALUE

50       CURLE_OK if supported; or an error such as:
51
52       CURLE_NOT_BUILT_IN - Not supported by the SSL backend
53
54       CURLE_UNKNOWN_OPTION
55
56       CURLE_OUT_OF_MEMORY
57

SEE ALSO

59       CURLOPT_PROXY_CAINFO(3),  CURLOPT_CAINFO(3),  CURLOPT_PROXY_SSL_VERIFY‐
60       HOST(3), CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
61
62
63
64libcurl 7.85.0                   May 17, 2022          CURLOPT_PROXY_CAPATH(3)
Impressum