CURLOPT_PROXY_SSL_OPTIONS.3 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_SSL_OPTIONS.md
  2. .TH CURLOPT_PROXY_SSL_OPTIONS 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_SSL_OPTIONS \- HTTPS proxy SSL behavior options
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_OPTIONS,
  9. long bitmask);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a long with a bitmask to tell libcurl about specific SSL
  13. behaviors. Available bits:
  14. .IP CURLSSLOPT_ALLOW_BEAST
  15. Tells libcurl to not attempt to use any workarounds for a security flaw in the
  16. SSL3 and TLS1.0 protocols. If this option is not used or this bit is set to 0,
  17. the SSL layer libcurl uses may use a work\-around for this flaw although it
  18. might cause interoperability problems with some (older) SSL implementations.
  19. WARNING: avoiding this work\-around lessens the security, and by setting this
  20. option to 1 you ask for exactly that. This option is only supported for Secure
  21. Transport and OpenSSL.
  22. .IP CURLSSLOPT_NO_REVOKE
  23. Tells libcurl to disable certificate revocation checks for those SSL backends
  24. where such behavior is present. This option is only supported for Schannel
  25. (the native Windows SSL library), with an exception in the case of Windows\(aq
  26. Untrusted Publishers block list which it seems cannot be bypassed. (Added in
  27. 7.44.0)
  28. .IP CURLSSLOPT_NO_PARTIALCHAIN
  29. Tells libcurl to not accept "partial" certificate chains, which it otherwise
  30. does by default. This option is only supported for OpenSSL and fails the
  31. certificate verification if the chain ends with an intermediate certificate
  32. and not with a root cert. (Added in 7.68.0)
  33. .IP CURLSSLOPT_REVOKE_BEST_EFFORT
  34. Tells libcurl to ignore certificate revocation checks in case of missing or
  35. offline distribution points for those SSL backends where such behavior is
  36. present. This option is only supported for Schannel (the native Windows SSL
  37. library). If combined with \fICURLSSLOPT_NO_REVOKE\fP, the latter takes
  38. precedence. (Added in 7.70.0)
  39. .IP CURLSSLOPT_NATIVE_CA
  40. Tell libcurl to use the operating system\(aqs native CA store for certificate
  41. verification. If you set this option and also set a CA certificate file or
  42. directory then during verification those certificates are searched in addition
  43. to the native CA store.
  44. Works with wolfSSL on Windows, Linux (Debian, Ubuntu, Gentoo, Fedora, RHEL),
  45. macOS, Android and iOS (added in 8.3.0), with GnuTLS (added in 8.5.0) or on
  46. Windows when built to use OpenSSL (Added in 7.71.0).
  47. .IP CURLSSLOPT_AUTO_CLIENT_CERT
  48. Tell libcurl to automatically locate and use a client certificate for
  49. authentication, when requested by the server. This option is only supported
  50. for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
  51. default behavior in libcurl with Schannel. Since the server can request any
  52. certificate that supports client authentication in the OS certificate store it
  53. could be a privacy violation and unexpected.
  54. (Added in 7.77.0)
  55. .SH DEFAULT
  56. 0
  57. .SH PROTOCOLS
  58. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  59. All TLS backends support this option.
  60. .SH EXAMPLE
  61. .nf
  62. int main(void)
  63. {
  64. CURL *curl = curl_easy_init();
  65. if(curl) {
  66. CURLcode res;
  67. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  68. curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
  69. /* weaken TLS only for use with silly proxies */
  70. curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, CURLSSLOPT_ALLOW_BEAST |
  71. CURLSSLOPT_NO_REVOKE);
  72. res = curl_easy_perform(curl);
  73. curl_easy_cleanup(curl);
  74. }
  75. }
  76. .fi
  77. .SH AVAILABILITY
  78. Added in curl 7.52.0
  79. .SH RETURN VALUE
  80. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  81. .SH SEE ALSO
  82. .BR CURLOPT_PROXY_SSLVERSION (3),
  83. .BR CURLOPT_PROXY_SSL_CIPHER_LIST (3),
  84. .BR CURLOPT_SSLVERSION (3),
  85. .BR CURLOPT_SSL_CIPHER_LIST (3)