1CURLOPT_FTPSSLAUTH(3)      curl_easy_setopt options      CURLOPT_FTPSSLAUTH(3)
2
3
4

NAME

6       CURLOPT_FTPSSLAUTH - order in which to attempt TLS vs SSL
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
12

DESCRIPTION

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

DEFAULT

30       CURLFTPAUTH_DEFAULT
31

PROTOCOLS

33       FTP
34

EXAMPLE

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

AVAILABILITY

47       Added in 7.12.2
48

RETURN VALUE

50       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
51       if not.
52

SEE ALSO

54       CURLOPT_USE_SSL(3), CURLOPT_FTP_SSL_CCC(3),
55
56
57
58libcurl 7.85.0                   May 17, 2022            CURLOPT_FTPSSLAUTH(3)
Impressum