CURLOPT_PROXY_SSLVERSION.3 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_PROXY_SSLVERSION 3 "16 Nov 2016" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_PROXY_SSLVERSION \- preferred HTTPS proxy TLS version
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION,
  32. long version);
  33. .fi
  34. .SH DESCRIPTION
  35. Pass a long as parameter to control which version of SSL/TLS to attempt to use
  36. when connecting to an HTTPS proxy.
  37. Use one of the available defines for this purpose. The available options are:
  38. .RS
  39. .IP CURL_SSLVERSION_DEFAULT
  40. The default action. This will attempt to figure out the remote SSL protocol
  41. version.
  42. .IP CURL_SSLVERSION_TLSv1
  43. TLSv1.x
  44. .IP CURL_SSLVERSION_TLSv1_0
  45. TLSv1.0
  46. .IP CURL_SSLVERSION_TLSv1_1
  47. TLSv1.1
  48. .IP CURL_SSLVERSION_TLSv1_2
  49. TLSv1.2
  50. .IP CURL_SSLVERSION_TLSv1_3
  51. TLSv1.3
  52. .RE
  53. The maximum TLS version can be set by using \fIone\fP of the
  54. CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
  55. CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
  56. The MAX macros are not supported for WolfSSL.
  57. .RS
  58. .IP CURL_SSLVERSION_MAX_DEFAULT
  59. The flag defines the maximum supported TLS version as TLSv1.2, or the default
  60. value from the SSL library.
  61. (Added in 7.54.0)
  62. .IP CURL_SSLVERSION_MAX_TLSv1_0
  63. The flag defines maximum supported TLS version as TLSv1.0.
  64. (Added in 7.54.0)
  65. .IP CURL_SSLVERSION_MAX_TLSv1_1
  66. The flag defines maximum supported TLS version as TLSv1.1.
  67. (Added in 7.54.0)
  68. .IP CURL_SSLVERSION_MAX_TLSv1_2
  69. The flag defines maximum supported TLS version as TLSv1.2.
  70. (Added in 7.54.0)
  71. .IP CURL_SSLVERSION_MAX_TLSv1_3
  72. The flag defines maximum supported TLS version as TLSv1.3.
  73. (Added in 7.54.0)
  74. .RE
  75. In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were
  76. documented to allow \fIonly\fP the specified TLS version, but behavior was
  77. inconsistent depending on the TLS library.
  78. .SH DEFAULT
  79. CURL_SSLVERSION_DEFAULT
  80. .SH PROTOCOLS
  81. All
  82. .SH EXAMPLE
  83. .nf
  84. CURL *curl = curl_easy_init();
  85. if(curl) {
  86. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  87. /* ask libcurl to use TLS version 1.0 or later */
  88. curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
  89. /* Perform the request */
  90. curl_easy_perform(curl);
  91. }
  92. .fi
  93. .SH AVAILABILITY
  94. Added in 7.52.0
  95. .SH RETURN VALUE
  96. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  97. .SH "SEE ALSO"
  98. .BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
  99. .BR CURLOPT_IPRESOLVE "(3) " CURLOPT_SSLVERSION "(3), "