GNURLOPT_TLSAUTH_USERNAME(3)
β¨ NAME β¨
okay bestie, this is the GNURLOPT_TLSAUTH_USERNAME(3) page, and it's literally about CURLOPT_TLSAUTH_USERNAME β the user name to use for TLS authentication π
like, the username half of your TLS auth setup, no cap.
π SYNOPSIS π
the whole signature vibe:
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char
*user);
π DESCRIPTION π
Pass a char * as the parameter, bestie. It should point to the null-terminated username to use for the TLS authentication method you specified with the CURLOPT_TLSAUTH_TYPE(3) option. It requires that the CURLOPT_TLSAUTH_PASSWORD(3) option also be set β both halves, periodt.
The application does not have to keep the string around after setting this option. So you can let it go after it's set; no need to babysit the string π«Ά.
β οΈ this feature relies on TLS SRP, which doesn't work with TLS 1.3. That's the caveat, bestie β SRP + TLS 1.3 is not it π.
πΈ DEFAULT πΈ
NULL β the default is literally NULL, iconic empty-slot energy π.
π¦ PROTOCOLS π¦
All TLS-based protocols β¨
π EXAMPLE π
copy-paste this little cutie:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.21.4 β¨
π₯ RETURN VALUE π₯
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. Like, the return value is giving error-code realness π.
π SEE ALSO π
mwah π β this page is from libcurl 7.37.0, dated 19 Jun 2014. bye bestie, go set that TLS auth username π«Ά
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2019, 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