1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_FTP_ALTERNATIVE_TO_USER 5Section: 3 6Source: libcurl 7Protocol: 8 - FTP 9See-also: 10 - CURLOPT_FTP_ACCOUNT (3) 11 - CURLOPT_FTP_SKIP_PASV_IP (3) 12 - CURLOPT_SERVER_RESPONSE_TIMEOUT (3) 13 - CURLOPT_USERNAME (3) 14Added-in: 7.15.5 15--- 16 17# NAME 18 19CURLOPT_FTP_ALTERNATIVE_TO_USER - command to use instead of USER with FTP 20 21# SYNOPSIS 22 23~~~c 24#include <curl/curl.h> 25 26CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER, 27 char *cmd); 28~~~ 29 30# DESCRIPTION 31 32Pass a char pointer as parameter, pointing to a string which is used to 33authenticate if the usual FTP "USER user" and "PASS password" negotiation 34fails. This is currently only known to be required when connecting to 35Tumbleweed's Secure Transport FTPS server using client certificates for 36authentication. 37 38The application does not have to keep the string around after setting this 39option. 40 41# DEFAULT 42 43NULL 44 45# %PROTOCOLS% 46 47# EXAMPLE 48 49~~~c 50int 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 68Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 69CURLE_OUT_OF_MEMORY if there was insufficient heap space. 70