CURLOPT_FTP_SSL_CCC.3 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" generated by cd2nroff 0.1 from CURLOPT_FTP_SSL_CCC.md
  2. .TH CURLOPT_FTP_SSL_CCC 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,
  9. long how);
  10. .fi
  11. .SH DESCRIPTION
  12. If enabled, this option makes libcurl use CCC (Clear Command Channel). It
  13. shuts down the SSL/TLS layer after authenticating. The rest of the control
  14. channel communication remains unencrypted. This allows NAT routers to follow
  15. the FTP transaction. Pass a long using one of the values below
  16. .IP CURLFTPSSL_CCC_NONE
  17. do not attempt to use CCC.
  18. .IP CURLFTPSSL_CCC_PASSIVE
  19. Do not initiate the shutdown, but wait for the server to do it. Do not send a
  20. reply.
  21. .IP CURLFTPSSL_CCC_ACTIVE
  22. Initiate the shutdown and wait for a reply.
  23. .SH DEFAULT
  24. CURLFTPSSL_CCC_NONE
  25. .SH PROTOCOLS
  26. This functionality affects ftp only
  27. .SH EXAMPLE
  28. .nf
  29. int main(void)
  30. {
  31. CURL *curl = curl_easy_init();
  32. if(curl) {
  33. CURLcode res;
  34. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
  35. curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
  36. /* go back to clear-text FTP after authenticating */
  37. curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, (long)CURLFTPSSL_CCC_ACTIVE);
  38. res = curl_easy_perform(curl);
  39. curl_easy_cleanup(curl);
  40. }
  41. }
  42. .fi
  43. .SH AVAILABILITY
  44. Added in curl 7.16.1
  45. .SH RETURN VALUE
  46. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  47. .SH SEE ALSO
  48. .BR CURLOPT_FTPSSLAUTH (3),
  49. .BR CURLOPT_PROTOCOLS_STR (3),
  50. .BR CURLOPT_USE_SSL (3)