1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSL_OPTIONS 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_SSL_OPTIONS (3) 9 - CURLOPT_SSLVERSION (3) 10 - CURLOPT_SSL_CIPHER_LIST (3) 11Protocol: 12 - TLS 13TLS-backend: 14 - All 15Added-in: 7.25.0 16--- 17 18# NAME 19 20CURLOPT_SSL_OPTIONS - SSL behavior options 21 22# SYNOPSIS 23 24~~~c 25#include <curl/curl.h> 26 27CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask); 28~~~ 29 30# DESCRIPTION 31 32Pass a long with a bitmask to tell libcurl about specific SSL 33behaviors. Available bits: 34 35## CURLSSLOPT_ALLOW_BEAST 36 37Tells libcurl to not attempt to use any workarounds for a security flaw in the 38SSL3 and TLS1.0 protocols. If this option is not used or this bit is set to 0, 39the SSL layer libcurl uses may use a work-around for this flaw although it 40might cause interoperability problems with some (older) SSL implementations. 41WARNING: avoiding this work-around lessens the security, and by setting this 42option to 1 you ask for exactly that. This option is only supported for Secure 43Transport and OpenSSL. 44 45## CURLSSLOPT_NO_REVOKE 46 47Tells libcurl to disable certificate revocation checks for those SSL backends 48where such behavior is present. This option is only supported for Schannel 49(the native Windows SSL library), with an exception in the case of Windows' 50Untrusted Publishers block list which it seems cannot be bypassed. (Added in 517.44.0) 52 53## CURLSSLOPT_NO_PARTIALCHAIN 54 55Tells libcurl to not accept "partial" certificate chains, which it otherwise 56does by default. This option is only supported for OpenSSL and fails the 57certificate verification if the chain ends with an intermediate certificate 58and not with a root cert. (Added in 7.68.0) 59 60## CURLSSLOPT_REVOKE_BEST_EFFORT 61 62Tells libcurl to ignore certificate revocation checks in case of missing or 63offline distribution points for those SSL backends where such behavior is 64present. This option is only supported for Schannel (the native Windows SSL 65library). If combined with *CURLSSLOPT_NO_REVOKE*, the latter takes 66precedence. (Added in 7.70.0) 67 68## CURLSSLOPT_NATIVE_CA 69 70Tell libcurl to use the operating system's native CA store for certificate 71verification. If you set this option and also set a CA certificate file or 72directory then during verification those certificates are searched in addition 73to the native CA store. 74 75Works with wolfSSL on Windows, Linux (Debian, Ubuntu, Gentoo, Fedora, RHEL), 76macOS, Android and iOS (added in 8.3.0), with GnuTLS (added in 8.5.0) or on 77Windows when built to use OpenSSL (Added in 7.71.0). 78 79## CURLSSLOPT_AUTO_CLIENT_CERT 80 81Tell libcurl to automatically locate and use a client certificate for 82authentication, when requested by the server. This option is only supported 83for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the 84default behavior in libcurl with Schannel. Since the server can request any 85certificate that supports client authentication in the OS certificate store it 86could be a privacy violation and unexpected. 87(Added in 7.77.0) 88 89## CURLSSLOPT_EARLYDATA 90 91Tell libcurl to try sending application data as TLS1.3 early data. This option 92is only supported for GnuTLS. This option works on a best effort basis, 93in cases when it wasn't possible to send early data the request is resent 94normally post-handshake. 95This option does not work when using QUIC. 96(Added in 8.11.0) 97 98# DEFAULT 99 1000 101 102# %PROTOCOLS% 103 104# EXAMPLE 105 106~~~c 107int main(void) 108{ 109 CURL *curl = curl_easy_init(); 110 if(curl) { 111 CURLcode res; 112 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 113 /* weaken TLS only for use with silly servers */ 114 curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_ALLOW_BEAST | 115 CURLSSLOPT_NO_REVOKE); 116 res = curl_easy_perform(curl); 117 curl_easy_cleanup(curl); 118 } 119} 120~~~ 121 122# %AVAILABILITY% 123 124# RETURN VALUE 125 126Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 127