CURLOPT_PROXY_SSLKEY.3 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_SSLKEY.md
  2. .TH CURLOPT_PROXY_SSLKEY 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_SSLKEY \- private key file for HTTPS proxy client cert
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY, char *keyfile);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a pointer to a null\-terminated string as parameter. The string should be
  12. the filename of your private key used for connecting to the HTTPS proxy. The
  13. default format is "PEM" and can be changed with
  14. \fICURLOPT_PROXY_SSLKEYTYPE(3)\fP.
  15. (Windows, iOS and Mac OS X) This option is ignored by Secure Transport and
  16. Schannel SSL backends because they expect the private key to be already
  17. present in the key chain or PKCS#12 file containing the certificate.
  18. The application does not have to keep the string around after setting this
  19. option.
  20. .SH DEFAULT
  21. NULL
  22. .SH PROTOCOLS
  23. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  24. This option works only with the following TLS backends:
  25. OpenSSL, Schannel, mbedTLS and wolfSSL
  26. .SH EXAMPLE
  27. .nf
  28. int main(void)
  29. {
  30. CURL *curl = curl_easy_init();
  31. if(curl) {
  32. CURLcode res;
  33. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  34. curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
  35. curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
  36. curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
  37. curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
  38. res = curl_easy_perform(curl);
  39. curl_easy_cleanup(curl);
  40. }
  41. }
  42. .fi
  43. .SH AVAILABILITY
  44. Added in curl 7.52.0
  45. .SH RETURN VALUE
  46. Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
  47. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  48. .SH SEE ALSO
  49. .BR CURLOPT_PROXY_SSLCERT (3),
  50. .BR CURLOPT_PROXY_SSLKEYTYPE (3),
  51. .BR CURLOPT_SSLCERT (3),
  52. .BR CURLOPT_SSLKEY (3),
  53. .BR CURLOPT_SSLKEYTYPE (3)