quickjs-tart

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

CURLOPT_FTP_ALTERNATIVE_TO_USER.md (1526B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_FTP_ALTERNATIVE_TO_USER
      5 Section: 3
      6 Source: libcurl
      7 Protocol:
      8   - FTP
      9 See-also:
     10   - CURLOPT_FTP_ACCOUNT (3)
     11   - CURLOPT_FTP_SKIP_PASV_IP (3)
     12   - CURLOPT_SERVER_RESPONSE_TIMEOUT (3)
     13   - CURLOPT_USERNAME (3)
     14 Added-in: 7.15.5
     15 ---
     16 
     17 # NAME
     18 
     19 CURLOPT_FTP_ALTERNATIVE_TO_USER - command to use instead of USER with FTP
     20 
     21 # SYNOPSIS
     22 
     23 ~~~c
     24 #include <curl/curl.h>
     25 
     26 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER,
     27                           char *cmd);
     28 ~~~
     29 
     30 # DESCRIPTION
     31 
     32 Pass a char pointer as parameter, pointing to a string which is used to
     33 authenticate if the usual FTP "USER user" and "PASS password" negotiation
     34 fails. This is currently only known to be required when connecting to
     35 Tumbleweed's Secure Transport FTPS server using client certificates for
     36 authentication.
     37 
     38 The application does not have to keep the string around after setting this
     39 option.
     40 
     41 # DEFAULT
     42 
     43 NULL
     44 
     45 # %PROTOCOLS%
     46 
     47 # EXAMPLE
     48 
     49 ~~~c
     50 int main(void)
     51 {
     52   CURL *curl = curl_easy_init();
     53   if(curl) {
     54     CURLcode res;
     55     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
     56     curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users");
     57     res = curl_easy_perform(curl);
     58 
     59     curl_easy_cleanup(curl);
     60   }
     61 }
     62 ~~~
     63 
     64 # %AVAILABILITY%
     65 
     66 # RETURN VALUE
     67 
     68 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     69 
     70 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     71 libcurl-errors(3).