1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXY_SSLKEYTYPE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_SSLCERT (3) 9 - CURLOPT_PROXY_SSLKEY (3) 10 - CURLOPT_SSLKEYTYPE (3) 11Protocol: 12 - TLS 13TLS-backend: 14 - OpenSSL 15 - BearSSL 16 - wolfSSL 17Added-in: 7.52.0 18--- 19 20# NAME 21 22CURLOPT_PROXY_SSLKEYTYPE - type of the proxy private key file 23 24# SYNOPSIS 25 26~~~c 27#include <curl/curl.h> 28 29CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type); 30~~~ 31 32# DESCRIPTION 33 34This option is for connecting to an HTTPS proxy, not an HTTPS server. 35 36Pass a pointer to a null-terminated string as parameter. The string should be 37the format of your private key. Supported formats are "PEM", "DER" and "ENG". 38 39The application does not have to keep the string around after setting this 40option. 41 42Using this option multiple times makes the last set string override the 43previous ones. Set it to NULL to disable its use again. 44 45# %PROTOCOLS% 46 47# EXAMPLE 48 49~~~c 50int main(void) 51{ 52 CURL *curl = curl_easy_init(); 53 if(curl) { 54 CURLcode res; 55 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 56 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); 57 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); 58 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); 59 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM"); 60 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); 61 res = curl_easy_perform(curl); 62 curl_easy_cleanup(curl); 63 } 64} 65~~~ 66 67# %AVAILABILITY% 68 69# RETURN VALUE 70 71Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or 72CURLE_OUT_OF_MEMORY if there was insufficient heap space. 73