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 20--- 21 22# NAME 23 24CURLOPT_PROXY_SSLCERTTYPE - type of the proxy client SSL certificate 25 26# SYNOPSIS 27 28~~~c 29#include <curl/curl.h> 30 31CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERTTYPE, char *type); 32~~~ 33 34# DESCRIPTION 35 36Pass a pointer to a null-terminated string as parameter. The string should be 37the format of your client certificate used when connecting to an HTTPS proxy. 38 39Supported formats are "PEM" and "DER", except with Secure Transport or 40Schannel. OpenSSL (versions 0.9.3 and later), Secure Transport (on iOS 5 or 41later, or OS X 10.7 or later) and Schannel support "P12" for PKCS#12-encoded 42files. 43 44The application does not have to keep the string around after setting this 45option. 46 47# DEFAULT 48 49"PEM" 50 51# EXAMPLE 52 53~~~c 54int main(void) 55{ 56 CURL *curl = curl_easy_init(); 57 if(curl) { 58 CURLcode res; 59 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 60 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); 61 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); 62 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM"); 63 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); 64 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); 65 res = curl_easy_perform(curl); 66 curl_easy_cleanup(curl); 67 } 68} 69~~~ 70 71# AVAILABILITY 72 73Added in 7.52.0 74 75If built TLS enabled. 76 77# RETURN VALUE 78 79Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or 80CURLE_OUT_OF_MEMORY if there was insufficient heap space. 81