CURLOPT_PROXY_SSLVERSION.3 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_SSLVERSION.md
  2. .TH CURLOPT_PROXY_SSLVERSION 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_SSLVERSION \- preferred HTTPS proxy TLS version
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION,
  9. long version);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a long as parameter to control which version of SSL/TLS to attempt to use
  13. when connecting to an HTTPS proxy.
  14. Use one of the available defines for this purpose. The available options are:
  15. .IP CURL_SSLVERSION_DEFAULT
  16. The default action. This attempts to figure out the remote SSL protocol
  17. version.
  18. .IP CURL_SSLVERSION_TLSv1
  19. TLSv1.x
  20. .IP CURL_SSLVERSION_TLSv1_0
  21. TLSv1.0
  22. .IP CURL_SSLVERSION_TLSv1_1
  23. TLSv1.1
  24. .IP CURL_SSLVERSION_TLSv1_2
  25. TLSv1.2
  26. .IP CURL_SSLVERSION_TLSv1_3
  27. TLSv1.3
  28. .PP
  29. The maximum TLS version can be set by using \fIone\fP of the CURL_SSLVERSION_MAX_
  30. macros below. It is also possible to OR \fIone\fP of the CURL_SSLVERSION_ macros
  31. with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. The MAX macros are not
  32. supported for wolfSSL.
  33. .IP CURL_SSLVERSION_MAX_DEFAULT
  34. The flag defines the maximum supported TLS version as TLSv1.2, or the default
  35. value from the SSL library.
  36. (Added in 7.54.0)
  37. .IP CURL_SSLVERSION_MAX_TLSv1_0
  38. The flag defines maximum supported TLS version as TLSv1.0.
  39. (Added in 7.54.0)
  40. .IP CURL_SSLVERSION_MAX_TLSv1_1
  41. The flag defines maximum supported TLS version as TLSv1.1.
  42. (Added in 7.54.0)
  43. .IP CURL_SSLVERSION_MAX_TLSv1_2
  44. The flag defines maximum supported TLS version as TLSv1.2.
  45. (Added in 7.54.0)
  46. .IP CURL_SSLVERSION_MAX_TLSv1_3
  47. The flag defines maximum supported TLS version as TLSv1.3.
  48. (Added in 7.54.0)
  49. .PP
  50. In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were
  51. documented to allow \fIonly\fP the specified TLS version, but behavior was
  52. inconsistent depending on the TLS library.
  53. .SH DEFAULT
  54. CURL_SSLVERSION_DEFAULT
  55. .SH PROTOCOLS
  56. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  57. All TLS backends support this option.
  58. .SH EXAMPLE
  59. .nf
  60. int main(void)
  61. {
  62. CURL *curl = curl_easy_init();
  63. if(curl) {
  64. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  65. /* ask libcurl to use TLS version 1.0 or later */
  66. curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
  67. /* Perform the request */
  68. curl_easy_perform(curl);
  69. }
  70. }
  71. .fi
  72. .SH AVAILABILITY
  73. Added in curl 7.52.0
  74. .SH RETURN VALUE
  75. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  76. .SH SEE ALSO
  77. .BR CURLOPT_HTTP_VERSION (3),
  78. .BR CURLOPT_IPRESOLVE (3),
  79. .BR CURLOPT_SSLVERSION (3),
  80. .BR CURLOPT_USE_SSL (3)