1CURLOPT_TLSAUTH_PASSWORD(3)curl_easy_setopt optionsCURLOPT_TLSAUTH_PASSWORD(3)
2
3
4
6 CURLOPT_TLSAUTH_PASSWORD - password to use for TLS authentication
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);
12
14 Pass a char * as parameter, which should point to the null-terminated
15 password to use for the TLS authentication method specified with the
16 CURLOPT_TLSAUTH_TYPE(3) option. Requires that the CURLOPT_TLSAUTH_USER‐
17 NAME(3) option also be set.
18
19 The application does not have to keep the string around after setting
20 this option.
21
22 This feature relies in TLS SRP which does not work with TLS 1.3.
23
25 NULL
26
28 All TLS-based protocols
29
31 CURL *curl = curl_easy_init();
32 if(curl) {
33 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
34 curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
35 curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
36 curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
37 ret = curl_easy_perform(curl);
38 curl_easy_cleanup(curl);
39 }
40
42 Added in 7.21.4, with the OpenSSL and GnuTLS backends only
43
45 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
46 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
47
49 CURLOPT_TLSAUTH_TYPE(3), CURLOPT_TLSAUTH_USERNAME(3),
50
51
52
53libcurl 8.0.1 January 02, 2023 CURLOPT_TLSAUTH_PASSWORD(3)