1CURLOPT_FTPSSLAUTH(3) curl_easy_setopt options CURLOPT_FTPSSLAUTH(3)
2
3
4
6 CURLOPT_FTPSSLAUTH - set order in which to attempt TLS vs SSL when us‐
7 ing FTP
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long or‐
13 der);
14
16 Pass a long using one of the values from below, to alter how libcurl
17 issues "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. This is
18 only interesting if CURLOPT_USE_SSL(3) is also set.
19
20 Possible order values:
21
22 CURLFTPAUTH_DEFAULT
23 Allow libcurl to decide.
24
25 CURLFTPAUTH_SSL
26 Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
27
28 CURLFTPAUTH_TLS
29 Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
30
32 CURLFTPAUTH_DEFAULT
33
35 FTP
36
38 CURL *curl = curl_easy_init();
39 if(curl) {
40 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
41 curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
42 /* funny server, ask for SSL before TLS */
43 curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
44 ret = curl_easy_perform(curl);
45 curl_easy_cleanup(curl);
46 }
47
49 Added in 7.12.2
50
52 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
53 if not.
54
56 CURLOPT_USE_SSL(3), CURLOPT_FTP_SSL_CCC(3),
57
58
59
60libcurl 7.76.1 November 04, 2020 CURLOPT_FTPSSLAUTH(3)