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 zero 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    CUR‐
24              LOPT_TLSAUTH_PASSWORD(3) options.
25
26              The application does not have to keep the  string  around  after
27              setting this option.
28

DEFAULT

30       blank
31

PROTOCOLS

33       All TLS-based protocols
34

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

55       CURLOPT_TLSAUTH_USERNAME(3), CURLOPT_TLSAUTH_PASSWORD(3),
56
57
58
59libcurl 7.64.0                   May 31, 2017          CURLOPT_TLSAUTH_TYPE(3)
Impressum