1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXY_TLSAUTH_USERNAME 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_TLSAUTH_PASSWORD (3) 9 - CURLOPT_PROXY_TLSAUTH_TYPE (3) 10 - CURLOPT_TLSAUTH_PASSWORD (3) 11 - CURLOPT_TLSAUTH_TYPE (3) 12--- 13 14# NAME 15 16CURLOPT_PROXY_TLSAUTH_USERNAME - user name to use for proxy TLS authentication 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_USERNAME, 24 char *user); 25~~~ 26 27# DESCRIPTION 28 29Pass a char pointer as parameter, which should point to the null-terminated 30username to use for the HTTPS proxy TLS authentication method specified with 31the CURLOPT_PROXY_TLSAUTH_TYPE(3) option. Requires that the 32CURLOPT_PROXY_TLSAUTH_PASSWORD(3) option also be set. 33 34The application does not have to keep the string around after setting this 35option. 36 37# DEFAULT 38 39NULL 40 41# PROTOCOLS 42 43All 44 45# EXAMPLE 46 47~~~c 48int main(void) 49{ 50 CURL *curl = curl_easy_init(); 51 if(curl) { 52 CURLcode res; 53 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 54 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); 55 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); 56 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); 57 curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); 58 res = curl_easy_perform(curl); 59 curl_easy_cleanup(curl); 60 } 61} 62~~~ 63 64# AVAILABILITY 65 66Added in 7.52.0, with the OpenSSL and GnuTLS backends only. 67 68# RETURN VALUE 69 70Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 71CURLE_OUT_OF_MEMORY if there was insufficient heap space. 72