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