1CURLOPT_SSL_OPTIONS(3)     curl_easy_setopt options     CURLOPT_SSL_OPTIONS(3)
2
3
4

NAME

6       CURLOPT_SSL_OPTIONS - SSL behavior options
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);
12

DESCRIPTION

14       Pass  a  long  with a bitmask to tell libcurl about specific SSL behav‐
15       iors. Available bits:
16
17       CURLSSLOPT_ALLOW_BEAST
18              Tells libcurl to not attempt to use any workarounds for a  secu‐
19              rity  flaw  in the SSL3 and TLS1.0 protocols.  If this option is
20              not used or this bit is set to 0, the SSL layer libcurl uses may
21              use a work-around for this flaw although it might cause interop‐
22              erability problems with some (older) SSL implementations.  WARN‐
23              ING: avoiding this work-around lessens the security, and by set‐
24              ting this option to 1 you ask for exactly that.  This option  is
25              only supported for Secure Transport, NSS and OpenSSL.
26
27       CURLSSLOPT_NO_REVOKE
28              Tells libcurl to disable certificate revocation checks for those
29              SSL backends where such behavior is present. This option is only
30              supported for Schannel (the native Windows SSL library), with an
31              exception in the case of  Windows'  Untrusted  Publishers  block
32              list which it seems cannot be bypassed. (Added in 7.44.0)
33
34       CURLSSLOPT_NO_PARTIALCHAIN
35              Tells  libcurl to not accept "partial" certificate chains, which
36              it otherwise does by default. This option is only supported  for
37              OpenSSL  and will fail the certificate verification if the chain
38              ends with an intermediate certificate and not with a root  cert.
39              (Added in 7.68.0)
40
41       CURLSSLOPT_REVOKE_BEST_EFFORT
42              Tells libcurl to ignore certificate revocation checks in case of
43              missing or offline distribution points for  those  SSL  backends
44              where  such  behavior  is present. This option is only supported
45              for Schannel (the native Windows SSL library). If combined  with
46              CURLSSLOPT_NO_REVOKE,  the  latter  takes  precedence. (Added in
47              7.70.0)
48
49       CURLSSLOPT_NATIVE_CA
50              Tell libcurl to use the operating system's native CA  store  for
51              certificate  verification.  Works  only on Windows when built to
52              use OpenSSL. If you set this option and also set a  CA  certifi‐
53              cate  file  or directory then during verification those certifi‐
54              cates are searched in addition to the native CA  store.   (Added
55              in 7.71.0)
56
57       CURLSSLOPT_AUTO_CLIENT_CERT
58              Tell  libcurl  to automatically locate and use a client certifi‐
59              cate for authentication, when requested by the server. This  op‐
60              tion  is only supported for Schannel (the native Windows SSL li‐
61              brary). Prior to 7.77.0 this was the default behavior in libcurl
62              with Schannel. Since the server can request any certificate that
63              supports client authentication in the OS  certificate  store  it
64              could be a privacy violation and unexpected.  (Added in 7.77.0)
65

DEFAULT

67       0
68

PROTOCOLS

70       All TLS-based protocols
71

EXAMPLE

73       CURL *curl = curl_easy_init();
74       if(curl) {
75         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
76         /* weaken TLS only for use with silly servers */
77         curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_ALLOW_BEAST |
78                          CURLSSLOPT_NO_REVOKE);
79         ret = curl_easy_perform(curl);
80         curl_easy_cleanup(curl);
81       }
82

AVAILABILITY

84       Added in 7.25.0
85

RETURN VALUE

87       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
88       if not.
89

SEE ALSO

91       CURLOPT_SSLVERSION(3), CURLOPT_SSL_CIPHER_LIST(3),
92
93
94
95libcurl 8.0.1                  January 05, 2023         CURLOPT_SSL_OPTIONS(3)
Impressum