| 1 |
.\" ************************************************************************** |
| 2 |
.\" * _ _ ____ _ |
| 3 |
.\" * Project ___| | | | _ \| | |
| 4 |
.\" * / __| | | | |_) | | |
| 5 |
.\" * | (__| |_| | _ <| |___ |
| 6 |
.\" * \___|\___/|_| \_\_____| |
| 7 |
.\" * |
| 8 |
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <[email protected]>, et al. |
| 9 |
.\" * |
| 10 |
.\" * This software is licensed as described in the file COPYING, which |
| 11 |
.\" * you should have received as part of this distribution. The terms |
| 12 |
.\" * are also available at https://curl.haxx.se/docs/copyright.html. |
| 13 |
.\" * |
| 14 |
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 15 |
.\" * copies of the Software, and permit persons to whom the Software is |
| 16 |
.\" * furnished to do so, under the terms of the COPYING file. |
| 17 |
.\" * |
| 18 |
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 19 |
.\" * KIND, either express or implied. |
| 20 |
.\" * |
| 21 |
.\" ************************************************************************** |
| 22 |
.\" |
| 23 |
.TH CURLOPT_PROXY_CAINFO 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" |
| 24 |
.SH NAME |
| 25 |
CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle |
| 26 |
.SH SYNOPSIS |
| 27 |
#include <curl/curl.h> |
| 28 |
|
| 29 |
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAINFO, char *path); |
| 30 |
.SH DESCRIPTION |
| 31 |
This option is for connecting to an HTTPS proxy, not an HTTPS server. |
| 32 |
|
| 33 |
Pass a char * to a zero terminated string naming a file holding one or more |
| 34 |
certificates to verify the HTTPS proxy with. |
| 35 |
|
| 36 |
If \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the |
| 37 |
server's certificate, \fICURLOPT_PROXY_CAINFO(3)\fP need not even indicate an |
| 38 |
accessible file. |
| 39 |
|
| 40 |
This option is by default set to the system path where libcurl's cacert bundle |
| 41 |
is assumed to be stored, as established at build time. |
| 42 |
|
| 43 |
If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module |
| 44 |
(libnsspem.so) needs to be available for this option to work properly. |
| 45 |
|
| 46 |
(iOS and macOS only) If curl is built against Secure Transport, then this |
| 47 |
option is supported for backward compatibility with other SSL engines, but it |
| 48 |
should not be set. If the option is not set, then curl will use the |
| 49 |
certificates in the system and user Keychain to verify the peer, which is the |
| 50 |
preferred method of verifying the peer's certificate chain. |
| 51 |
|
| 52 |
The application does not have to keep the string around after setting this |
| 53 |
option. |
| 54 |
.SH DEFAULT |
| 55 |
Built-in system specific |
| 56 |
.SH PROTOCOLS |
| 57 |
Used with HTTPS proxy |
| 58 |
.SH EXAMPLE |
| 59 |
.nf |
| 60 |
CURL *curl = curl_easy_init(); |
| 61 |
if(curl) { |
| 62 |
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); |
| 63 |
/* using an HTTPS proxy */ |
| 64 |
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443"); |
| 65 |
curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem"); |
| 66 |
ret = curl_easy_perform(curl); |
| 67 |
curl_easy_cleanup(curl); |
| 68 |
} |
| 69 |
.fi |
| 70 |
.SH AVAILABILITY |
| 71 |
Added in 7.52.0 |
| 72 |
|
| 73 |
For TLS backends that don't support certificate files, the |
| 74 |
\fICURLOPT_PROXY_CAINFO(3)\fP option is ignored. Refer to |
| 75 |
https://curl.haxx.se/docs/ssl-compared.html |
| 76 |
.SH RETURN VALUE |
| 77 |
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or |
| 78 |
CURLE_OUT_OF_MEMORY if there was insufficient heap space. |
| 79 |
.SH "SEE ALSO" |
| 80 |
.BR CURLOPT_PROXY_CAPATH "(3), " |
| 81 |
.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), " |
| 82 |
.BR CURLOPT_CAPATH "(3), " |
| 83 |
.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), " |