quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_PROXY_CAPATH.md (1885B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_CAPATH
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_CAINFO (3)
      9   - CURLOPT_DEBUGFUNCTION (3)
     10   - CURLOPT_PROXY_CAINFO (3)
     11   - CURLOPT_PROXY_SSL_VERIFYHOST (3)
     12   - CURLOPT_STDERR (3)
     13 Protocol:
     14   - TLS
     15 TLS-backend:
     16   - OpenSSL
     17   - GnuTLS
     18   - mbedTLS
     19 Added-in: 7.52.0
     20 ---
     21 
     22 # NAME
     23 
     24 CURLOPT_PROXY_CAPATH - directory holding HTTPS proxy CA certificates
     25 
     26 # SYNOPSIS
     27 
     28 ~~~c
     29 #include <curl/curl.h>
     30 
     31 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);
     32 ~~~
     33 
     34 # DESCRIPTION
     35 
     36 Pass a char pointer to a null-terminated string naming a directory holding
     37 multiple CA certificates to verify the HTTPS proxy with. If libcurl is built
     38 against OpenSSL, the certificate directory must be prepared using the OpenSSL
     39 **c_rehash** utility. This makes sense only when
     40 CURLOPT_PROXY_SSL_VERIFYPEER(3) is enabled (which it is by default).
     41 
     42 The application does not have to keep the string around after setting this
     43 option.
     44 
     45 Using this option multiple times makes the last set string override the
     46 previous ones. Set it to NULL to disable its use again and switch back to
     47 internal default.
     48 
     49 The default value for this can be figured out with CURLINFO_CAPATH(3).
     50 
     51 # DEFAULT
     52 
     53 NULL
     54 
     55 # %PROTOCOLS%
     56 
     57 # EXAMPLE
     58 
     59 ~~~c
     60 int main(void)
     61 {
     62   CURL *curl = curl_easy_init();
     63   if(curl) {
     64     CURLcode res;
     65     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     66     /* using an HTTPS proxy */
     67     curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
     68     curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
     69     res = curl_easy_perform(curl);
     70     curl_easy_cleanup(curl);
     71   }
     72 }
     73 ~~~
     74 
     75 # %AVAILABILITY%
     76 
     77 # RETURN VALUE
     78 
     79 CURLE_OK if supported; or an error such as:
     80 
     81 CURLE_NOT_BUILT_IN - Not supported by the SSL backend
     82 
     83 CURLE_UNKNOWN_OPTION
     84 
     85 CURLE_OUT_OF_MEMORY