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 or‐
12       der);
13

DESCRIPTION

15       Pass a long using one of the values from below, to  alter  how  libcurl
16       issues "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. This is
17       only interesting if CURLOPT_USE_SSL(3) is also set.
18
19       Possible order values:
20
21       CURLFTPAUTH_DEFAULT
22              Allow libcurl to decide.
23
24       CURLFTPAUTH_SSL
25              Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
26
27       CURLFTPAUTH_TLS
28              Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
29

DEFAULT

31       CURLFTPAUTH_DEFAULT
32

PROTOCOLS

34       FTP
35

EXAMPLE

37       CURL *curl = curl_easy_init();
38       if(curl) {
39         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
40         curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
41         /* funny server, ask for SSL before TLS */
42         curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
43         ret = curl_easy_perform(curl);
44         curl_easy_cleanup(curl);
45       }
46

AVAILABILITY

48       Added in 7.12.2
49

RETURN VALUE

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

SEE ALSO

55       CURLOPT_USE_SSL(3), CURLOPT_FTP_SSL_CCC(3),
56
57
58
59libcurl 7.79.1                September 08, 2021         CURLOPT_FTPSSLAUTH(3)
Impressum