CURLOPT_PROXY_KEYPASSWD.3 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_KEYPASSWD.md
  2. .TH CURLOPT_PROXY_KEYPASSWD 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_KEYPASSWD \- passphrase for the proxy private key
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_KEYPASSWD, char *pwd);
  9. .fi
  10. .SH DESCRIPTION
  11. This option is for connecting to an HTTPS proxy, not an HTTPS server.
  12. Pass a pointer to a null\-terminated string as parameter. It is used as the
  13. password required to use the \fICURLOPT_PROXY_SSLKEY(3)\fP private key. You never
  14. need a passphrase to load a certificate but you need one to load your private
  15. key.
  16. The application does not have to keep the string around after setting this
  17. option.
  18. .SH DEFAULT
  19. NULL
  20. .SH PROTOCOLS
  21. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  22. This option works only with the following TLS backends:
  23. OpenSSL, Schannel, mbedTLS and wolfSSL
  24. .SH EXAMPLE
  25. .nf
  26. int main(void)
  27. {
  28. CURL *curl = curl_easy_init();
  29. if(curl) {
  30. CURLcode res;
  31. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
  32. curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
  33. curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
  34. res = curl_easy_perform(curl);
  35. curl_easy_cleanup(curl);
  36. }
  37. }
  38. .fi
  39. .SH AVAILABILITY
  40. Added in curl 7.52.0
  41. .SH RETURN VALUE
  42. Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
  43. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  44. .SH SEE ALSO
  45. .BR CURLOPT_KEYPASSWD (3),
  46. .BR CURLOPT_PROXY_SSLKEY (3),
  47. .BR CURLOPT_SSH_PRIVATE_KEYFILE (3),
  48. .BR CURLOPT_SSLKEY (3)