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

DEFAULT

41       Built-in system specific
42

PROTOCOLS

44       Used with HTTPS proxy
45

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

69       CURLOPT_PROXY_CAINFO_BLOB(3),       CURLOPT_PROXY_CAPATH(3),       CUR‐
70       LOPT_PROXY_SSL_VERIFYPEER(3),   CURLOPT_PROXY_SSL_VERIFYHOST(3),   CUR‐
71       LOPT_CAINFO(3),   CURLOPT_CAINFO_BLOB(3),    CURLOPT_CAPATH(3),    CUR‐
72       LOPT_SSL_VERIFYPEER(3), CURLOPT_SSL_VERIFYHOST(3),
73
74
75
76libcurl 7.82.0                 November 26, 2021       CURLOPT_PROXY_CAINFO(3)
Impressum