CURLOPT_PROXY_SSLVERSION.3 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2016, 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.haxx.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. .\" **************************************************************************
  22. .\"
  23. .TH CURLOPT_PROXY_SSLVERSION 3 "January 10, 2018" "libcurl 7.61.1" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version
  26. .SH SYNOPSIS
  27. #include <curl/curl.h>
  28. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long version);
  29. .SH DESCRIPTION
  30. Pass a long as parameter to control which version of SSL/TLS to attempt to use
  31. when connecting to an HTTPS proxy.
  32. Use one of the available defines for this purpose. The available options are:
  33. .RS
  34. .IP CURL_SSLVERSION_DEFAULT
  35. The default action. This will attempt to figure out the remote SSL protocol
  36. version.
  37. .IP CURL_SSLVERSION_TLSv1
  38. TLSv1.x
  39. .IP CURL_SSLVERSION_TLSv1_0
  40. TLSv1.0
  41. .IP CURL_SSLVERSION_TLSv1_1
  42. TLSv1.1
  43. .IP CURL_SSLVERSION_TLSv1_2
  44. TLSv1.2
  45. .IP CURL_SSLVERSION_TLSv1_3
  46. TLSv1.3
  47. .RE
  48. The maximum TLS version can be set by using \fIone\fP of the
  49. CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
  50. CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
  51. The MAX macros are not supported for SSL backends axTLS or wolfSSL.
  52. .RS
  53. .IP CURL_SSLVERSION_MAX_DEFAULT
  54. The flag defines the maximum supported TLS version as TLSv1.2, or the default
  55. value from the SSL library.
  56. (Added in 7.54.0)
  57. .IP CURL_SSLVERSION_MAX_TLSv1_0
  58. The flag defines maximum supported TLS version as TLSv1.0.
  59. (Added in 7.54.0)
  60. .IP CURL_SSLVERSION_MAX_TLSv1_1
  61. The flag defines maximum supported TLS version as TLSv1.1.
  62. (Added in 7.54.0)
  63. .IP CURL_SSLVERSION_MAX_TLSv1_2
  64. The flag defines maximum supported TLS version as TLSv1.2.
  65. (Added in 7.54.0)
  66. .IP CURL_SSLVERSION_MAX_TLSv1_3
  67. The flag defines maximum supported TLS version as TLSv1.3.
  68. (Added in 7.54.0)
  69. .RE
  70. .SH DEFAULT
  71. CURL_SSLVERSION_DEFAULT
  72. .SH PROTOCOLS
  73. All
  74. .SH EXAMPLE
  75. .nf
  76. CURL *curl = curl_easy_init();
  77. if(curl) {
  78. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  79. /* ask libcurl to use TLS version 1.0 or later */
  80. curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
  81. /* Perform the request */
  82. curl_easy_perform(curl);
  83. }
  84. .fi
  85. .SH AVAILABILITY
  86. Added in 7.52.0
  87. .SH RETURN VALUE
  88. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  89. .SH "SEE ALSO"
  90. .BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
  91. .BR CURLOPT_IPRESOLVE "(3) " CURLOPT_SSLVERSION "(3), "