1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXY_SSLCERT 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_SSLCERTTYPE (3) 9 - CURLOPT_PROXY_SSLKEY (3) 10 - CURLOPT_SSLCERT (3) 11--- 12 13# NAME 14 15CURLOPT_PROXY_SSLCERT - HTTPS proxy client certificate 16 17# SYNOPSIS 18 19~~~c 20#include <curl/curl.h> 21 22CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT, char *cert); 23~~~ 24 25# DESCRIPTION 26 27This option is for connecting to an HTTPS proxy, not an HTTPS server. 28 29Pass a pointer to a null-terminated string as parameter. The string should be 30the filename of your client certificate used to connect to the HTTPS proxy. 31The default format is "P12" on Secure Transport and "PEM" on other engines, 32and can be changed with CURLOPT_PROXY_SSLCERTTYPE(3). 33 34With Secure Transport, this can also be the nickname of the certificate you 35wish to authenticate with as it is named in the security database. If you want 36to use a file from the current directory, please precede it with "./" prefix, 37in order to avoid confusion with a nickname. 38 39When using a client certificate, you most likely also need to provide a 40private key with CURLOPT_PROXY_SSLKEY(3). 41 42The application does not have to keep the string around after setting this 43option. 44 45# DEFAULT 46 47NULL 48 49# PROTOCOLS 50 51Used with HTTPS proxy 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_SSLCERT, "client.pem"); 64 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); 65 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); 66 res = curl_easy_perform(curl); 67 curl_easy_cleanup(curl); 68 } 69} 70~~~ 71 72# AVAILABILITY 73 74Added in 7.52.0 75 76# RETURN VALUE 77 78Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or 79CURLE_OUT_OF_MEMORY if there was insufficient heap space. 80