GNURLOPT_SSL_OPTIONS(3)
GNURLOPT_SSL_OPTIONS(3) π
manual name: curl_easy_setopt options β hey bestie, this is the gnurl curl_easy_setopt options page, and weβre talking about CURLOPT_SSL_OPTIONS. Itβs giving βtiny bitmask, big SSL behavior energy.β π
π NAME π
CURLOPT_SSL_OPTIONS β set SSL behavior options.
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long
bitmask);
πΈ DESCRIPTION πΈ
You pass a long thatβs a bitmask, and it tells libcurl about specific SSL behaviors. Available bits:
CURLSSLOPT_ALLOW_BEASTβ tells libcurl not to attempt to use any workarounds for a security flaw in theSSL3andTLS1.0protocols. If this option isnβt used or this bit is set to0, the SSL layer libcurl uses may use a work-around for this flaw, although it might cause interoperability problems with some (older) SSL implementations.
π¨ WARNING: avoiding this work-around lessens the security, and by setting this option to 1 you ask for exactly that. This option is only supported for Secure Transport, NSS and OpenSSL.
CURLSSLOPT_NO_REVOKEβ tells libcurl to disable certificate revocation checks for those SSL backends where such behavior is present. This option is only supported for Schannel (the native Windows SSL library), with an exception in the case of Windowsβ Untrusted Publishers block list which it seems canβt be bypassed. (Added in7.44.0)CURLSSLOPT_NO_PARTIALCHAINβ tells libcurl to not accept"partial"certificate chains, which it otherwise does by default. This option is only supported for OpenSSL and will fail the certificate verification if the chain ends with an intermediate certificate and not with a root cert. (Added in7.68.0)CURLSSLOPT_REVOKE_BEST_EFFORTβ tells libcurl to ignore certificate revocation checks in case of missing or offline distribution points for those SSL backends where such behavior is present. This option is only supported for Schannel (the native Windows SSL library). If combined withCURLSSLOPT_NO_REVOKE, the latter takes precedence. (Added in7.70.0)CURLSSLOPT_NATIVE_CAβ tell libcurl to use the operating systemβs native CA store for certificate verification. Works only on Windows when built to use OpenSSL. This option is experimental and behavior is subject to change. (Added in7.71.0)
π DEFAULT π
0 β thatβs the default, periodt.
π PROTOCOLS π
All TLS-based protocols
π¦ EXAMPLE π¦
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* weaken TLS only for use with silly servers */
curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_ALLOW_BEAST |
CURLSSLOPT_NO_REVOKE);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.25.0
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
π SEE ALSO π
xoxo, your Unix bestie π β source/version: libcurl 7.37.0; date: 19 Jun 2014.
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms