1CURLOPT_FTP_ALTERNATIVE_TO_UcSuErRl(_3e)asy_setopt oCpUtRiLoOnPsT_FTP_ALTERNATIVE_TO_USER(3)
2
3
4
6 CURLOPT_FTP_ALTERNATIVE_TO_USER - command to use instead of USER with
7 FTP
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER,
13 char *cmd);
14
16 Pass a char * as parameter, pointing to a string which will be used to
17 authenticate if the usual FTP "USER user" and "PASS password" negotia‐
18 tion fails. This is currently only known to be required when connecting
19 to Tumbleweed's Secure Transport FTPS server using client certificates
20 for authentication.
21
22 The application does not have to keep the string around after setting
23 this option.
24
26 NULL
27
29 FTP
30
32 CURL *curl = curl_easy_init();
33 if(curl) {
34 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
35
36 curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users");
37
38 ret = curl_easy_perform(curl);
39
40 curl_easy_cleanup(curl);
41 }
42
44 Added in 7.15.5
45
47 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
48 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
49
51 CURLOPT_FTP_SKIP_PASV_IP(3), CURLOPT_FTP_RESPONSE_TIMEOUT(3),
52
53
54
55libcurl 7.66.0 May 05, 2017CURLOPT_FTP_ALTERNATIVE_TO_USER(3)