GNURLOPT_TLSAUTH_PASSWORD(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay bestie, this page is GNURLOPT_TLSAUTH_PASSWORD(3), part of the curl_easy_setopt options family, and the actual option is CURLOPT_TLSAUTH_PASSWORD β€” password to use for TLS authentication. no cap, that's the whole name vibe.

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char
*pwd);

πŸ¦‹ DESCRIPTION πŸ¦‹

so you pass a char * as the parameter, bestie β€” it should point to the null-terminated password for the TLS authentication method you specified with the CURLOPT_TLSAUTH_TYPE(3) option. this option also requires that the CURLOPT_TLSAUTH_USERNAME(3) option be set too. fr fr, both of them.

the application does not have to keep the string around after setting this option, which is lowkey convenient β€” it's giving set-and-forget energy, icon behavior.

⚠️ heads up: this feature relies on TLS SRP, and TLS SRP doesn't work with TLS 1.3. so if you're on TLS 1.3, this one's not gonna slay for you.

πŸŽ€ DEFAULT πŸŽ€

NULL

🌈 PROTOCOLS 🌈

All TLS-based protocols

πŸ“ EXAMPLE πŸ“

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. literally the whole return value tea, periodt.

πŸ“ SEE ALSO πŸ“

CURLOPT_TLSAUTH_TYPE(3), CURLOPT_TLSAUTH_USERNAME(3), β€” yes bestie, go read those too, iykyk.


okay that's the whole page, bestie 🫢 β€” this one came from libcurl 7.37.0, dated 19 Jun 2014, and the page is GNURLOPT_TLSAUTH_PASSWORD(3). periodt πŸ’…βœ¨

πŸ“¦ where this page comes from