1CURLOPT_TLSAUTH_TYPE(3) libcurl CURLOPT_TLSAUTH_TYPE(3)
2
3
4
6 CURLOPT_TLSAUTH_TYPE - TLS authentication methods
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, char *type);
12
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 RFC 5054 and provides mutual authentica‐
21 tion if both sides have a shared secret. To use TLS-SRP, you
22 must 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
31 blank
32
34 All TLS-based protocols
35
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
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
52 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
53 if not.
54
56 CURLOPT_TLSAUTH_USERNAME(3), CURLOPT_TLSAUTH_PASSWORD(3),
57
58
59
60ibcurl 8.2.1 June 25, 2023 CURLOPT_TLSAUTH_TYPE(3)