CURLOPT_FTPSSLAUTH(3)
π CURLOPT_FTPSSLAUTH π
ok so this is a page from the libcurl manual (Library Functions Manual), and it's about CURLOPT_FTPSSLAUTH β the icon of "which one do we try first, TLS or SSL?" β¨
πΈ NAME πΈ
CURLOPT_FTPSSLAUTH β the order in which to attempt TLS vs SSL π
π¦ SYNOPSIS π¦
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
β¨ DESCRIPTION β¨
bestie, you pass a long in here using one of the values from below π and it alters how libcurl issues "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. basically you're deciding who goes first, no cap.
heads up: this is only interesting if CURLOPT_USE_SSL(3) is also set. otherwise it's just sitting there, main character energy with no plot π
Possible order values:
CURLFTPAUTH_DEFAULTβ let libcurl decide, she's got this πCURLFTPAUTH_SSLβ try"AUTH SSL"first, and only if that fails try"AUTH TLS"π₯CURLFTPAUTH_TLSβ try"AUTH TLS"first, and only if that fails try"AUTH SSL"π₯
π DEFAULT π
CURLFTPAUTH_DEFAULT
(the classic "libcurl knows best" vibe π)
π PROTOCOLS π
idk this one's exclusive β this functionality affects ftp only π
π₯ EXAMPLE π₯
here's the whole thing, literally:
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
/* funny server, ask for SSL before TLS */
curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
see that comment? /* funny server, ask for SSL before TLS */ β yeah, sometimes the server's just quirky like that π«Ά
π§ HISTORY π§
ok so lore drop π: the CURLFTPAUTH_* enums became long types in 8.16.0. prior to this version a long cast was necessary when passed to curl_easy_setopt(3). so if you're on old code and seeing casts, that's why, iykyk π
β AVAILABILITY β
added in curl 7.12.2 β vintage but still slaying π
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK(0) means everything was OK π- non-zero means an error occurred π β see
libcurl-errors(3)
π SEE ALSO π
that's the whole page bestie, go configure something iconic π β¨
sign-off szn: this was the libcurl manual page, dated 2026-10-12 πΈ β catch you on the next one, love u π«Ά
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms