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

NAME

6       CURLOPT_FTP_SSL_CCC - switch off SSL again with FTP after auth
7

SYNOPSIS

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

DESCRIPTION

15       If  enabled, this option makes libcurl use CCC (Clear Command Channel).
16       It shuts down the SSL/TLS layer after authenticating. The rest  of  the
17       control  channel  communication  will  be  unencrypted. This allows NAT
18       routers to follow the FTP transaction. Pass a long  using  one  of  the
19       values below
20
21       CURLFTPSSL_CCC_NONE
22              Don't attempt to use CCC.
23
24       CURLFTPSSL_CCC_PASSIVE
25              Do  not initiate the shutdown, but wait for the server to do it.
26              Do not send a reply.
27
28       CURLFTPSSL_CCC_ACTIVE
29              Initiate the shutdown and wait for a reply.
30

DEFAULT

32       CURLFTPSSL_CCC_NONE
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_CONTROL);
42         /* go back to clear-text FTP after authenticating */
43         curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
44         ret = curl_easy_perform(curl);
45         curl_easy_cleanup(curl);
46       }
47

AVAILABILITY

49       Added in 7.16.1
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_FTPSSLAUTH(3),
57
58
59
60libcurl 7.79.1                 November 04, 2020        CURLOPT_FTP_SSL_CCC(3)
Impressum