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 17Added-in: 7.52.0 18--- 19 20# NAME 21 22CURLOPT_PROXY_TLSAUTH_TYPE - HTTPS proxy TLS authentication methods 23 24# SYNOPSIS 25 26~~~c 27#include <curl/curl.h> 28 29CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_TYPE, 30 char *type); 31~~~ 32 33# DESCRIPTION 34 35Pass a pointer to a null-terminated string as parameter. The string should be 36the method of the TLS authentication used for the HTTPS connection. Supported 37method is "SRP". 38 39Using this option multiple times makes the last set string override the 40previous ones. Set it to NULL to restore to internal default. 41 42The application does not have to keep the string around after setting this 43option. 44 45## SRP 46 47TLS-SRP authentication. Secure Remote Password authentication for TLS is 48defined in RFC 5054 and provides mutual authentication if both sides have a 49shared secret. To use TLS-SRP, you must also set the 50CURLOPT_PROXY_TLSAUTH_USERNAME(3) and CURLOPT_PROXY_TLSAUTH_PASSWORD(3) 51options. 52 53# DEFAULT 54 55blank 56 57# %PROTOCOLS% 58 59# EXAMPLE 60 61~~~c 62int main(void) 63{ 64 CURL *curl = curl_easy_init(); 65 if(curl) { 66 CURLcode res; 67 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 68 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); 69 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); 70 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); 71 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); 72 res = curl_easy_perform(curl); 73 curl_easy_cleanup(curl); 74 } 75} 76~~~ 77 78# %AVAILABILITY% 79 80# RETURN VALUE 81 82Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 83