1CURLOPT_TLSAUTH_USERNAME(3)curl_easy_setopt optionsCURLOPT_TLSAUTH_USERNAME(3)
2
3
4
6 CURLOPT_TLSAUTH_USERNAME - user name to use for TLS authentication
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char
12 *user);
13
15 Pass a char * as parameter, which should point to the zero terminated
16 username to use for the TLS authentication method specified with the
17 CURLOPT_TLSAUTH_TYPE(3) option. Requires that the CURLOPT_TLSAUTH_PASS‐
18 WORD(3) option also be set.
19
20 The application does not have to keep the string around after setting
21 this option.
22
23 This feature relies in TLS SRP which doesn't work with TLS 1.3.
24
26 NULL
27
29 All TLS-based protocols
30
32 CURL *curl = curl_easy_init();
33 if(curl) {
34 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
35 curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
36 curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
37 curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
38 ret = curl_easy_perform(curl);
39 curl_easy_cleanup(curl);
40 }
41
43 Added in 7.21.4
44
46 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
47 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
48
50 CURLOPT_TLSAUTH_TYPE(3), CURLOPT_TLSAUTH_PASSWORD(3),
51
52
53
54libcurl 7.69.1 December 16, 2019 CURLOPT_TLSAUTH_USERNAME(3)