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