CURLOPT_SSH_AUTH_TYPES.md add history, drop cast

This commit is contained in:
Viktor Szakats 2025-08-01 17:26:41 +02:00
parent db28a94097
commit 461ab6c11b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -52,7 +52,7 @@ int main(void)
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, (long)
curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES,
CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
@ -60,6 +60,11 @@ int main(void)
}
~~~
# HISTORY
**CURLSSH_AUTH_*** macros became `long` types in 8.16.0, prior to this version
a `long` cast was necessary when passed to curl_easy_setopt(3).
# %AVAILABILITY%
# RETURN VALUE