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
17---
18
19# NAME
20
21CURLOPT_PROXY_SSLKEYTYPE - type of the proxy private key file
22
23# SYNOPSIS
24
25~~~c
26#include <curl/curl.h>
27
28CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type);
29~~~
30
31# DESCRIPTION
32
33This option is for connecting to an HTTPS proxy, not an HTTPS server.
34
35Pass a pointer to a null-terminated string as parameter. The string should be
36the format of your private key. Supported formats are "PEM", "DER" and "ENG".
37
38The application does not have to keep the string around after setting this
39option.
40
41# EXAMPLE
42
43~~~c
44int main(void)
45{
46  CURL *curl = curl_easy_init();
47  if(curl) {
48    CURLcode res;
49    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
50    curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
51    curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
52    curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
53    curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
54    curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
55    res = curl_easy_perform(curl);
56    curl_easy_cleanup(curl);
57  }
58}
59~~~
60
61# AVAILABILITY
62
63Added in 7.52.0
64
65# RETURN VALUE
66
67Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
68CURLE_OUT_OF_MEMORY if there was insufficient heap space.
69