1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXY_TLSAUTH_TYPE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_TLSAUTH_PASSWORD (3) 9 - CURLOPT_PROXY_TLSAUTH_USERNAME (3) 10 - CURLOPT_TLSAUTH_PASSWORD (3) 11 - CURLOPT_TLSAUTH_USERNAME (3) 12Protocol: 13 - TLS 14TLS-backend: 15 - OpenSSL 16 - GnuTLS 17--- 18 19# NAME 20 21CURLOPT_PROXY_TLSAUTH_TYPE - HTTPS proxy TLS authentication methods 22 23# SYNOPSIS 24 25~~~c 26#include <curl/curl.h> 27 28CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_TYPE, 29 char *type); 30~~~ 31 32# DESCRIPTION 33 34Pass a pointer to a null-terminated string as parameter. The string should be 35the method of the TLS authentication used for the HTTPS connection. Supported 36method is "SRP". 37 38## SRP 39 40TLS-SRP authentication. Secure Remote Password authentication for TLS is 41defined in RFC 5054 and provides mutual authentication if both sides have a 42shared secret. To use TLS-SRP, you must also set the 43CURLOPT_PROXY_TLSAUTH_USERNAME(3) and 44CURLOPT_PROXY_TLSAUTH_PASSWORD(3) options. 45 46The application does not have to keep the string around after setting this 47option. 48 49# DEFAULT 50 51blank 52 53# EXAMPLE 54 55~~~c 56int main(void) 57{ 58 CURL *curl = curl_easy_init(); 59 if(curl) { 60 CURLcode res; 61 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 62 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); 63 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); 64 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); 65 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); 66 res = curl_easy_perform(curl); 67 curl_easy_cleanup(curl); 68 } 69} 70~~~ 71 72# AVAILABILITY 73 74Added in 7.52.0 75 76You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this 77to work. 78 79# RETURN VALUE 80 81Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 82