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

NAME

6       CURLOPT_TLSAUTH_TYPE - TLS authentication methods
7

SYNOPSIS

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

DESCRIPTION

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

DEFAULT

31       blank
32

PROTOCOLS

34       All TLS-based protocols
35

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

56       CURLOPT_TLSAUTH_USERNAME(3), CURLOPT_TLSAUTH_PASSWORD(3),
57
58
59
60libcurl 7.82.0                 November 26, 2021       CURLOPT_TLSAUTH_TYPE(3)
Impressum