quickjs-tart

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

CURLOPT_PROXY_KEYPASSWD.md (1709B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_KEYPASSWD
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_KEYPASSWD (3)
      9   - CURLOPT_PROXY_SSLKEY (3)
     10   - CURLOPT_SSH_PRIVATE_KEYFILE (3)
     11   - CURLOPT_SSLKEY (3)
     12 Protocol:
     13   - TLS
     14 TLS-backend:
     15   - OpenSSL
     16   - mbedTLS
     17   - Schannel
     18   - wolfSSL
     19 Added-in: 7.52.0
     20 ---
     21 
     22 # NAME
     23 
     24 CURLOPT_PROXY_KEYPASSWD - passphrase for the proxy private key
     25 
     26 # SYNOPSIS
     27 
     28 ~~~c
     29 #include <curl/curl.h>
     30 
     31 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_KEYPASSWD, char *pwd);
     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. It is used as the
     39 password required to use the CURLOPT_PROXY_SSLKEY(3) private key. You never
     40 need a passphrase to load a certificate but you need one to load your private
     41 key.
     42 
     43 The application does not have to keep the string around after setting this
     44 option.
     45 
     46 Using this option multiple times makes the last set string override the
     47 previous ones. Set it to NULL to disable its use again.
     48 
     49 # DEFAULT
     50 
     51 NULL
     52 
     53 # %PROTOCOLS%
     54 
     55 # EXAMPLE
     56 
     57 ~~~c
     58 int main(void)
     59 {
     60   CURL *curl = curl_easy_init();
     61   if(curl) {
     62     CURLcode res;
     63     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     64     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
     65     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
     66     res = curl_easy_perform(curl);
     67     curl_easy_cleanup(curl);
     68   }
     69 }
     70 ~~~
     71 
     72 # %AVAILABILITY%
     73 
     74 # RETURN VALUE
     75 
     76 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     77 
     78 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     79 libcurl-errors(3).