quickjs-tart

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

CURLOPT_PROXY_TLSAUTH_PASSWORD.md (1835B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_PROXY_TLSAUTH_PASSWORD
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_PROXY_TLSAUTH_TYPE (3)
      9   - CURLOPT_PROXY_TLSAUTH_USERNAME (3)
     10   - CURLOPT_TLSAUTH_TYPE (3)
     11   - CURLOPT_TLSAUTH_USERNAME (3)
     12 Protocol:
     13   - TLS
     14 TLS-backend:
     15   - OpenSSL
     16   - GnuTLS
     17 Added-in: 7.52.0
     18 ---
     19 
     20 # NAME
     21 
     22 CURLOPT_PROXY_TLSAUTH_PASSWORD - password to use for proxy TLS authentication
     23 
     24 # SYNOPSIS
     25 
     26 ~~~c
     27 #include <curl/curl.h>
     28 
     29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_PASSWORD,
     30                           char *pwd);
     31 ~~~
     32 
     33 # DESCRIPTION
     34 
     35 Pass a char pointer as parameter, which should point to the null-terminated
     36 password to use for the TLS authentication method specified with the
     37 CURLOPT_PROXY_TLSAUTH_TYPE(3) option. Requires that the
     38 CURLOPT_PROXY_TLSAUTH_USERNAME(3) option also be set.
     39 
     40 The application does not have to keep the string around after setting this
     41 option.
     42 
     43 Using this option multiple times makes the last set string override the
     44 previous ones. Set it to NULL to disable its use again.
     45 
     46 # DEFAULT
     47 
     48 NULL
     49 
     50 # %PROTOCOLS%
     51 
     52 # EXAMPLE
     53 
     54 ~~~c
     55 int main(void)
     56 {
     57   CURL *curl = curl_easy_init();
     58   if(curl) {
     59     CURLcode res;
     60     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     61     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
     62     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
     63     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
     64     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
     65     res = curl_easy_perform(curl);
     66     curl_easy_cleanup(curl);
     67   }
     68 }
     69 ~~~
     70 
     71 # %AVAILABILITY%
     72 
     73 # RETURN VALUE
     74 
     75 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     76 
     77 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     78 libcurl-errors(3).