1CURLOPT_TLSAUTH_TYPE(3)    curl_easy_setopt options    CURLOPT_TLSAUTH_TYPE(3)
2
3
4

NAME

6       CURLOPT_TLSAUTH_TYPE - set TLS authentication methods
7

SYNOPSIS

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

DESCRIPTION

15       Pass a pointer to a null-terminated string  as  parameter.  The  string
16       should  be  the  method  of the TLS authentication. Supported method is
17       "SRP".
18
19
20       SRP    TLS-SRP authentication. Secure  Remote  Password  authentication
21              for TLS is defined in RFC5054 and provides mutual authentication
22              if both sides have a shared secret. To  use  TLS-SRP,  you  must
23              also   set   the   CURLOPT_TLSAUTH_USERNAME(3)  and  CURLOPT_TL‐
24              SAUTH_PASSWORD(3) options.
25
26              The application does not have to keep the  string  around  after
27              setting this option.
28
29              TLS SRP doesn't work with TLS 1.3.
30

DEFAULT

32       blank
33

PROTOCOLS

35       All TLS-based protocols
36

EXAMPLE

38       CURL *curl = curl_easy_init();
39       if(curl) {
40         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
41         curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
42         curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
43         curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
44         ret = curl_easy_perform(curl);
45         curl_easy_cleanup(curl);
46       }
47

AVAILABILITY

49       You  need  to build libcurl with GnuTLS or OpenSSL with TLS-SRP support
50       for this to work. Added in 7.21.4
51

RETURN VALUE

53       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
54       if not.
55

SEE ALSO

57       CURLOPT_TLSAUTH_USERNAME(3), CURLOPT_TLSAUTH_PASSWORD(3),
58
59
60
61libcurl 7.76.1                 November 04, 2020       CURLOPT_TLSAUTH_TYPE(3)
Impressum