GNURLOPT_PROXY_SSLVERSION(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to GNURLOPT_PROXY_SSLVERSION(3) πŸ’– β€” this page belongs to the curl_easy_setopt options manual crew, and it's all about CURLOPT_PROXY_SSLVERSION: set preferred proxy TLS/SSL version. periodt. ✨

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long
       version);

πŸ’… DESCRIPTION πŸ’…

Pass a long as the parameter, bestie, and it controls which version of SSL/TLS to attempt to use when connecting to an HTTPS proxy. no cap. 🫢

Use one of the available defines for this purpose. The available options are:

  • CURL_SSLVERSION_DEFAULT β€” the default action. This will attempt to figure out the remote SSL protocol version.
  • CURL_SSLVERSION_TLSv1 β€” TLSv1.x
  • CURL_SSLVERSION_TLSv1_0 β€” TLSv1.0
  • CURL_SSLVERSION_TLSv1_1 β€” TLSv1.1
  • CURL_SSLVERSION_TLSv1_2 β€” TLSv1.2
  • CURL_SSLVERSION_TLSv1_3 β€” TLSv1.3

The maximum TLS version can be set by using one of the CURL_SSLVERSION_MAX_ macros below. It is also possible to OR one of the CURL_SSLVERSION_ macros with one of the CURL_SSLVERSION_MAX_ macros. πŸŒ€

🚨 the MAX macros are not supported for WolfSSL.
  • CURL_SSLVERSION_MAX_DEFAULT β€” the flag defines the maximum supported TLS version as TLSv1.2, or the default value from the SSL library. (Added in 7.54.0)
  • CURL_SSLVERSION_MAX_TLSv1_0 β€” the flag defines maximum supported TLS version as TLSv1.0. (Added in 7.54.0)
  • CURL_SSLVERSION_MAX_TLSv1_1 β€” the flag defines maximum supported TLS version as TLSv1.1. (Added in 7.54.0)
  • CURL_SSLVERSION_MAX_TLSv1_2 β€” the flag defines maximum supported TLS version as TLSv1.2. (Added in 7.54.0)
  • CURL_SSLVERSION_MAX_TLSv1_3 β€” the flag defines maximum supported TLS version as TLSv1.3. (Added in 7.54.0)
πŸ•°οΈ tiny time-travel warning: in versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were documented to allow only the specified TLS version, but behavior was inconsistent depending on the TLS library.

πŸŽ€ DEFAULT πŸŽ€

CURL_SSLVERSION_DEFAULT is the default, periodt. πŸ’…

🌈 PROTOCOLS 🌈

All 🌈 β€” yes bestie, all of them.

🧚 EXAMPLE 🧚

example time, bestie β€” this is the exact snippet:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");

  /* ask libcurl to use TLS version 1.0 or later */
  curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);

  /* Perform the request */
  curl_easy_perform(curl);
}

⭐ AVAILABILITY ⭐

Added in 7.52.0. slay. ⭐

πŸ”₯ RETURN VALUE πŸ”₯

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. that's it. πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– that's the whole page, bestie. source/version: libcurl 7.52.0; date: 16 Nov 2016; footer manual: GNURLOPT_P..._SSLVERSION(3). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from