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