Artifactspublic-v0

curl

master
ply4 git calls216 ms289 KiB2 cachedprotocol v2
144 lines4.6 KiBRaw

NAME

CURLOPT_SSL_OPTIONS - SSL behavior options

SYNOPSIS

c
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);

DESCRIPTION

Pass a long with a bitmask to tell libcurl about specific SSL behaviors. Available bits:

CURLSSLOPT_ALLOW_BEAST

Tells libcurl to not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. If this option is not used or this bit is set to 0, the SSL layer libcurl uses may use a workaround for this flaw although it might cause interoperability problems with some (older) SSL implementations.

WARNING: avoiding this workaround lessens the security, and by setting this option to 1 you ask for exactly that. This option is only supported for Secure Transport 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 cannot be bypassed.

CURLSSLOPT_NO_PARTIALCHAIN

Tells libcurl to not accept "partial" certificate chains, which it otherwise does by default. This option fails the certificate verification if the chain ends with an intermediate certificate and not with a root cert.

Works with OpenSSL and its forks (BoringSSL, LibreSSL, etc). (Added in 7.68.0)

Works with Schannel if the user specified certificates to verify the peer. (Added in 8.15.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 with CURLSSLOPT_NO_REVOKE, the latter takes precedence. (Added in 7.70.0)

CURLSSLOPT_NATIVE_CA

Tell libcurl to use the operating system's native CA store for certificate verification. This option is independent of other CA certificate locations set at run time or build time. Those locations are searched in addition to the native CA store.

Works with wolfSSL on Windows, Linux (Debian, Fedora, Gentoo, RHEL, Ubuntu), macOS, Android and iOS (added in 8.3.0); with GnuTLS (added in 8.5.0) and with OpenSSL and its forks (BoringSSL, LibreSSL, etc) on Windows (Added in 7.71.0).

This works with Rustls on Windows, macOS, Android and iOS. On Linux it is equivalent to using the Mozilla CA certificate bundle. When used with Rustls only the native CA store is consulted, not other locations set at run time or build time. (Added in 8.13.0)

CURLSSLOPT_AUTO_CLIENT_CERT

Tell libcurl to automatically locate and use a client certificate for authentication, when requested by the server. This option is only supported for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the default behavior in libcurl with Schannel. Since the server can request any certificate that supports client authentication in the OS certificate store it could be a privacy violation and unexpected. (Added in 7.77.0)

CURLSSLOPT_EARLYDATA

Tell libcurl to try sending application data as TLS1.3 early data. This option is supported for GnuTLS, OpenSSL, quictls and wolfSSL (but not AWS-LC or BoringSSL). It works on TCP and QUIC connections using ngtcp2. This option works on a best effort basis, in cases when it was not possible to send early data the request is resent normally post-handshake. (Added in 8.11.0 for GnuTLS and 8.13.0 for OpenSSL, quictls and wolfSSL)

DEFAULT

0

%PROTOCOLS%

EXAMPLE

c
int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    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);
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}

HISTORY

CURLSSLOPT_* macros became long types in 8.15.0, prior to this version a long cast was necessary when passed to curl_easy_setopt(3).

%AVAILABILITY%

RETURN VALUE

curl_easy_setopt(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).

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---
18# NAME
20CURLOPT_SSL_OPTIONS - SSL behavior options
22# SYNOPSIS
24~~~c
25#include <curl/curl.h>
27CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);
28~~~
30# DESCRIPTION
32Pass a long with a bitmask to tell libcurl about specific SSL
33behaviors. Available bits:
35## CURLSSLOPT_ALLOW_BEAST
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 workaround for this flaw although it
40might cause interoperability problems with some (older) SSL implementations.
42**WARNING:** avoiding this workaround lessens the security, and by setting
43this option to 1 you ask for exactly that. This option is only supported for
44Secure Transport and OpenSSL.
46## CURLSSLOPT_NO_REVOKE
48Tells libcurl to disable certificate revocation checks for those SSL backends
49where such behavior is present. This option is only supported for Schannel
50(the native Windows SSL library), with an exception in the case of Windows'
51Untrusted Publishers block list which it seems cannot be bypassed.
53## CURLSSLOPT_NO_PARTIALCHAIN
55Tells libcurl to not accept "partial" certificate chains, which it otherwise
56does by default. This option fails the certificate verification if the chain
57ends with an intermediate certificate and not with a root cert.
59Works with OpenSSL and its forks (BoringSSL, LibreSSL, etc). (Added in 7.68.0)
61Works with Schannel if the user specified certificates to verify the peer.
62(Added in 8.15.0)
64## CURLSSLOPT_REVOKE_BEST_EFFORT
66Tells libcurl to ignore certificate revocation checks in case of missing or
67offline distribution points for those SSL backends where such behavior is
68present. This option is only supported for Schannel (the native Windows SSL
69library). If combined with *CURLSSLOPT_NO_REVOKE*, the latter takes
70precedence. (Added in 7.70.0)
72## CURLSSLOPT_NATIVE_CA
74Tell libcurl to use the operating system's native CA store for certificate
75verification. This option is independent of other CA certificate locations set
76at run time or build time. Those locations are searched in addition to the
77native CA store.
79Works with wolfSSL on Windows, Linux (Debian, Fedora, Gentoo, RHEL, Ubuntu),
80macOS, Android and iOS (added in 8.3.0); with GnuTLS (added in 8.5.0) and with
81OpenSSL and its forks (BoringSSL, LibreSSL, etc) on Windows (Added in 7.71.0).
83This works with Rustls on Windows, macOS, Android and iOS. On Linux it is
84equivalent to using the Mozilla CA certificate bundle. When used with Rustls
85_only_ the native CA store is consulted, not other locations set at run time or
86build time. (Added in 8.13.0)
88## CURLSSLOPT_AUTO_CLIENT_CERT
90Tell libcurl to automatically locate and use a client certificate for
91authentication, when requested by the server. This option is only supported
92for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
93default behavior in libcurl with Schannel. Since the server can request any
94certificate that supports client authentication in the OS certificate store it
95could be a privacy violation and unexpected.
96(Added in 7.77.0)
98## CURLSSLOPT_EARLYDATA
100Tell libcurl to try sending application data as TLS1.3 early data. This option
101is supported for GnuTLS, OpenSSL, quictls and wolfSSL (but not AWS-LC or
102BoringSSL). It works on TCP and QUIC connections using ngtcp2.
103This option works on a best effort basis,
104in cases when it was not possible to send early data the request is resent
105normally post-handshake.
106(Added in 8.11.0 for GnuTLS and 8.13.0 for OpenSSL, quictls and wolfSSL)
108# DEFAULT
112# %PROTOCOLS%
114# EXAMPLE
116~~~c
117int main(void)
119 CURL *curl = curl_easy_init();
120 if(curl) {
121 CURLcode result;
122 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
123 /* weaken TLS only for use with silly servers */
124 curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
125 CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
126 result = curl_easy_perform(curl);
127 curl_easy_cleanup(curl);
128 }
130~~~
132# HISTORY
134**CURLSSLOPT_*** macros became `long` types in 8.15.0, prior to this version
135a `long` cast was necessary when passed to curl_easy_setopt(3).
137# %AVAILABILITY%
139# RETURN VALUE
141curl_easy_setopt(3) returns a CURLcode indicating success or error.
143CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
144libcurl-errors(3).
Diagnostics4 git calls · 216 ms
CallStatusSizeTime0216 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2002.2 KiB211 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=211
git.response.bytes=2218
git.response.cache=MISS
git.response.duration_ms=211
git.fetch.wants=ccbb4895ef9bffd21dfea970d70c0bdaba3af3ce
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2218
git.pkt.payload.max=2197
git.sideband.band1.bytes=2196
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e339a969b5f162
Request
10e1124d…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format