quickjs-tart

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

CURLOPT_PROXY_SSLKEY.md (1941B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_SSLKEY
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_PROXY_SSLCERT (3)
      9   - CURLOPT_PROXY_SSLKEYTYPE (3)
     10   - CURLOPT_SSLCERT (3)
     11   - CURLOPT_SSLKEY (3)
     12   - CURLOPT_SSLKEYTYPE (3)
     13 Protocol:
     14   - TLS
     15 TLS-backend:
     16   - OpenSSL
     17   - mbedTLS
     18   - Schannel
     19   - wolfSSL
     20 Added-in: 7.52.0
     21 ---
     22 
     23 # NAME
     24 
     25 CURLOPT_PROXY_SSLKEY - private key file for HTTPS proxy client cert
     26 
     27 # SYNOPSIS
     28 
     29 ~~~c
     30 #include <curl/curl.h>
     31 
     32 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY, char *keyfile);
     33 ~~~
     34 
     35 # DESCRIPTION
     36 
     37 Pass a pointer to a null-terminated string as parameter. The string should be
     38 the filename of your private key used for connecting to the HTTPS proxy. The
     39 default format is "PEM" and can be changed with
     40 CURLOPT_PROXY_SSLKEYTYPE(3).
     41 
     42 This option is ignored by the Schannel backend because it expects the private
     43 key to be already present in the key chain or PKCS#12 file containing the
     44 certificate.
     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).