1CURLOPT_PROXY_SSLCERT(3) curl_easy_setopt options CURLOPT_PROXY_SSLCERT(3)
2
3
4
6 CURLOPT_PROXY_SSLCERT - set SSL proxy client certificate
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT, char
12 *cert);
13
15 This option is for connecting to an HTTPS proxy, not an HTTPS server.
16
17 Pass a pointer to a zero terminated string as parameter. The string
18 should be the file name of your client certificate used to connect to
19 the HTTPS proxy. The default format is "P12" on Secure Transport and
20 "PEM" on other engines, and can be changed with CURLOPT_PROXY_SSLCERT‐
21 TYPE(3).
22
23 With NSS or Secure Transport, this can also be the nickname of the cer‐
24 tificate you wish to authenticate with as it is named in the security
25 database. If you want to use a file from the current directory, please
26 precede it with "./" prefix, in order to avoid confusion with a nick‐
27 name.
28
29 When using a client certificate, you most likely also need to provide a
30 private key with CURLOPT_PROXY_SSLKEY(3).
31
32 The application does not have to keep the string around after setting
33 this option.
34
36 NULL
37
39 Used with HTTPS proxy
40
42 CURL *curl = curl_easy_init();
43 if(curl) {
44 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
45 curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
46 curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
47 curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
48 curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
49 ret = curl_easy_perform(curl);
50 curl_easy_cleanup(curl);
51 }
52
54 Added in 7.52.0
55
57 Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
58 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
59
61 CURLOPT_PROXY_SSLCERTTYPE(3), CURLOPT_PROXY_SSLKEY(3), CUR‐
62 LOPT_SSLCERT(3),
63
64
65
66libcurl 7.69.1 April 17, 2018 CURLOPT_PROXY_SSLCERT(3)