1CURLOPT_PROXY_SSLKEY(3)    curl_easy_setopt options    CURLOPT_PROXY_SSLKEY(3)
2
3
4

NAME

6       CURLOPT_PROXY_SSLKEY - private keyfile for HTTPS proxy client cert
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL  *handle,  CURLOPT_PROXY_SSLKEY,  char
12       *keyfile);
13

DESCRIPTION

15       Pass a pointer to a null-terminated string  as  parameter.  The  string
16       should  be the file name of your private key used for connecting to the
17       HTTPS proxy. The default format is "PEM" and can be changed  with  CUR‐
18       LOPT_PROXY_SSLKEYTYPE(3).
19
20       (iOS  and  Mac  OS  X  only)  This  option is ignored if curl was built
21       against Secure Transport. Secure Transport expects the private  key  to
22       be  already present in the keychain or PKCS#12 file containing the cer‐
23       tificate.
24
25       The application does not have to keep the string around  after  setting
26       this option.
27

DEFAULT

29       NULL
30

PROTOCOLS

32       All
33

EXAMPLE

35       CURL *curl = curl_easy_init();
36       if(curl) {
37         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
38         curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
39         curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
40         curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
41         curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
42         ret = curl_easy_perform(curl);
43         curl_easy_cleanup(curl);
44       }
45

AVAILABILITY

47       Added in 7.52.0
48
49       If built TLS enabled.
50

RETURN VALUE

52       Returns  CURLE_OK  if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
53       CURLE_OUT_OF_MEMORY if there was insufficient heap space.
54

SEE ALSO

56       CURLOPT_PROXY_SSLKEYTYPE(3), CURLOPT_PROXY_SSLCERT(3),  CURLOPT_SSLKEY‐
57       TYPE(3), CURLOPT_SSLCERT(3),
58
59
60
61libcurl 7.79.1                September 08, 2021       CURLOPT_PROXY_SSLKEY(3)
Impressum