1CURLOPT_TLSAUTH_USERNAME(3)curl_easy_setopt optionsCURLOPT_TLSAUTH_USERNAME(3)
2
3
4

NAME

6       CURLOPT_TLSAUTH_USERNAME - user name to use for TLS authentication
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char
12       *user);
13

DESCRIPTION

15       Pass a char * as parameter, which should point to  the  null-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

DEFAULT

26       NULL
27

PROTOCOLS

29       All TLS-based protocols
30

EXAMPLE

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

AVAILABILITY

43       Added in 7.21.4
44

RETURN VALUE

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

SEE ALSO

50       CURLOPT_TLSAUTH_TYPE(3), CURLOPT_TLSAUTH_PASSWORD(3),
51
52
53
54libcurl 7.79.1                 November 04, 2020   CURLOPT_TLSAUTH_USERNAME(3)
Impressum