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

NAME

6       CURLOPT_FTPSSLAUTH  -  set  order  in  which to attempt TLS vs SSL when
7       using FTP
8

SYNOPSIS

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

DESCRIPTION

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

DEFAULT

32       CURLFTPAUTH_DEFAULT
33

PROTOCOLS

35       FTP
36

EXAMPLE

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

AVAILABILITY

49       Added in 7.12.2
50

RETURN VALUE

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

SEE ALSO

56       CURLOPT_USE_SSL(3), CURLOPT_FTP_SSL_CCC(3),
57
58
59
60libcurl 7.61.1                   May 31, 2017            CURLOPT_FTPSSLAUTH(3)
Impressum