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