GNURLOPT_FTP_SSL_CCC(3)
π NAME π
CURLOPT_FTP_SSL_CCC β switch off SSL again with FTP after auth
okay bestie, welcome to the gnurl curl_easy_setopt options page for GNURLOPT_FTP_SSL_CCC(3) β this one is all about telling FTP to drop back to clear-text after auth, and itβs lowkey iconic. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,
long how);
π¦ DESCRIPTION π¦
If enabled, this option makes libcurl use CCC (Clear Command Channel). It shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. You pass a long using one of the values below:
CURLFTPSSL_CCC_NONEβ Donβt attempt to use CCC.CURLFTPSSL_CCC_PASSIVEβ Do not initiate the shutdown, but wait for the server to do it. Do not send a reply.CURLFTPSSL_CCC_ACTIVEβ Initiate the shutdown and wait for a reply.
bestie, note the vibe: once CCC happens, the rest of the control channel is literally unencrypted. Thatβs the whole point, but itβs still a big mood to be aware of. π
π DEFAULT π
CURLFTPSSL_CCC_NONE β no CCC attempts unless you say so, periodt.
π PROTOCOLS π
FTP β thatβs it, thatβs the protocol. π¦
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
/* go back to clear-text FTP after authenticating */
curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π AVAILABILITY π
Added in 7.16.1 β vintage but still serving. β¨
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
π₯ SEE ALSO π₯
okay bye bestie! this page is libcurl 7.37.0, dated 19 Jun 2014, and the manual is GNURLOPT_FTP_SSL_CCC(3). mwah π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms