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

NAME

6       CURLOPT_PROXY_CAINFO - path to proxy Certificate Authority (CA) bundle
7

SYNOPSIS

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

DESCRIPTION

14       This option is for connecting to an HTTPS proxy, not an HTTPS server.
15
16       Pass  a char * to a null-terminated string naming a file holding one or
17       more certificates to verify the HTTPS proxy with.
18
19       If CURLOPT_PROXY_SSL_VERIFYPEER(3) is zero and you avoid verifying  the
20       server's certificate, CURLOPT_PROXY_CAINFO(3) need not even indicate an
21       accessible file.
22
23       This option is by default set to the system path where libcurl's cacert
24       bundle is assumed to be stored, as established at build time.
25
26       If  curl is built against the NSS SSL library, the NSS PEM PKCS#11 mod‐
27       ule (libnsspem.so) needs to be available for this option to work  prop‐
28       erly.
29
30       (iOS  and  macOS  only) If curl is built against Secure Transport, then
31       this option is supported for backward compatibility with other SSL  en‐
32       gines,  but  it  should not be set. If the option is not set, then curl
33       will use the certificates in the system and user Keychain to verify the
34       peer, which is the preferred method of verifying the peer's certificate
35       chain.
36
37       The application does not have to keep the string around  after  setting
38       this option.
39
40       The default value for this can be figured out with CURLINFO_CAINFO(3).
41

DEFAULT

43       Built-in system specific
44

PROTOCOLS

46       Used with HTTPS proxy
47

EXAMPLE

49       CURL *curl = curl_easy_init();
50       if(curl) {
51         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
52         /* using an HTTPS proxy */
53         curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
54         curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
55         ret = curl_easy_perform(curl);
56         curl_easy_cleanup(curl);
57       }
58

AVAILABILITY

60       Added in 7.52.0
61
62       For  TLS  backends  that  do  not  support  certificate files, the CUR‐
63       LOPT_PROXY_CAINFO(3)     option     is      ignored.      Refer      to
64       https://curl.se/docs/ssl-compared.html
65

RETURN VALUE

67       Returns  CURLE_OK  if  the option is supported, CURLE_UNKNOWN_OPTION if
68       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
69

SEE ALSO

71       CURLOPT_PROXY_CAINFO_BLOB(3),       CURLOPT_PROXY_CAPATH(3),       CUR‐
72       LOPT_PROXY_SSL_VERIFYPEER(3),   CURLOPT_PROXY_SSL_VERIFYHOST(3),   CUR‐
73       LOPT_CAINFO(3),   CURLOPT_CAINFO_BLOB(3),    CURLOPT_CAPATH(3),    CUR‐
74       LOPT_SSL_VERIFYPEER(3), CURLOPT_SSL_VERIFYHOST(3),
75
76
77
78libcurl 7.85.0                   May 17, 2022          CURLOPT_PROXY_CAINFO(3)
Impressum