quickjs-tart

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

CURLOPT_PROXY_SSLCERT.md (1910B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_SSLCERT
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_PROXY_SSLCERTTYPE (3)
      9   - CURLOPT_PROXY_SSLKEY (3)
     10   - CURLOPT_SSLCERT (3)
     11 Protocol:
     12   - TLS
     13 TLS-backend:
     14   - OpenSSL
     15   - GnuTLS
     16   - mbedTLS
     17   - Schannel
     18   - wolfSSL
     19 Added-in: 7.52.0
     20 ---
     21 
     22 # NAME
     23 
     24 CURLOPT_PROXY_SSLCERT - HTTPS proxy client certificate
     25 
     26 # SYNOPSIS
     27 
     28 ~~~c
     29 #include <curl/curl.h>
     30 
     31 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT, char *cert);
     32 ~~~
     33 
     34 # DESCRIPTION
     35 
     36 This option is for connecting to an HTTPS proxy, not an HTTPS server.
     37 
     38 Pass a pointer to a null-terminated string as parameter. The string should be
     39 the filename of your client certificate used to connect to the HTTPS proxy.
     40 The default format "PEM", and can be changed with
     41 CURLOPT_PROXY_SSLCERTTYPE(3).
     42 
     43 When using a client certificate, you most likely also need to provide a
     44 private key with CURLOPT_PROXY_SSLKEY(3).
     45 
     46 The application does not have to keep the string around after setting this
     47 option.
     48 
     49 Using this option multiple times makes the last set string override the
     50 previous ones. Set it to NULL to disable its use again.
     51 
     52 # DEFAULT
     53 
     54 NULL
     55 
     56 # %PROTOCOLS%
     57 
     58 # EXAMPLE
     59 
     60 ~~~c
     61 int main(void)
     62 {
     63   CURL *curl = curl_easy_init();
     64   if(curl) {
     65     CURLcode res;
     66     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     67     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
     68     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
     69     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     70     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
     71     res = curl_easy_perform(curl);
     72     curl_easy_cleanup(curl);
     73   }
     74 }
     75 ~~~
     76 
     77 # %AVAILABILITY%
     78 
     79 # RETURN VALUE
     80 
     81 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     82 
     83 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     84 libcurl-errors(3).