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