CURLOPT_FTPSSLAUTH.3 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .\" generated by cd2nroff 0.1 from CURLOPT_FTPSSLAUTH.md
  2. .TH CURLOPT_FTPSSLAUTH 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_FTPSSLAUTH \- order in which to attempt TLS vs SSL
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a long using one of the values from below, to alter how libcurl issues
  12. \&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. This is only
  13. interesting if \fICURLOPT_USE_SSL(3)\fP is also set.
  14. Possible \fIorder\fP values:
  15. .IP CURLFTPAUTH_DEFAULT
  16. Allow libcurl to decide.
  17. .IP CURLFTPAUTH_SSL
  18. Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
  19. .IP CURLFTPAUTH_TLS
  20. Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
  21. .SH DEFAULT
  22. CURLFTPAUTH_DEFAULT
  23. .SH PROTOCOLS
  24. This functionality affects ftp only
  25. .SH EXAMPLE
  26. .nf
  27. int main(void)
  28. {
  29. CURL *curl = curl_easy_init();
  30. if(curl) {
  31. CURLcode res;
  32. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
  33. curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
  34. /* funny server, ask for SSL before TLS */
  35. curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, (long)CURLFTPAUTH_SSL);
  36. res = curl_easy_perform(curl);
  37. curl_easy_cleanup(curl);
  38. }
  39. }
  40. .fi
  41. .SH AVAILABILITY
  42. Added in curl 7.12.2
  43. .SH RETURN VALUE
  44. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  45. .SH SEE ALSO
  46. .BR CURLOPT_FTP_SSL_CCC (3),
  47. .BR CURLOPT_USE_SSL (3)