]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: TLS session ticket caching reworked
authorStefan Eissing <stefan@eissing.org>
Wed, 18 Dec 2024 12:22:35 +0000 (13:22 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Dec 2024 13:59:23 +0000 (14:59 +0100)
commitfa0ccd9f1fbbbd77bf50b26e3ba231ea6c729474
tree3d7977ec23afde7933d1fd4bac9b1044a33c7f76
parente5e2e09a75def01f7c103d11d36fb34cbaf464dd
lib: TLS session ticket caching reworked

Described in detail in internal doc TLS-SESSIONS.md

Main points:
- use a new `ssl_peer_key` for cache lookups by connection filters
- recognize differences between TLSv1.3 and other tickets
  * TLSv1.3 tickets are single-use, cache can hold several of them for a peer
  * TLSv1.2 are reused, keep only a single one per peer
- differentiate between ticket BLOB to store (that could be persisted) and object instances
- use put/take/return pattern for cache access
- remember TLS version, ALPN protocol, time received and lifetime of ticket
- auto-expire tickets after their lifetime

Closes #15774
36 files changed:
docs/Makefile.am
docs/internals/DYNBUF.md
docs/internals/LLIST.md
docs/internals/TLS-SESSIONS.md [new file with mode: 0644]
lib/Makefile.inc
lib/dynbuf.c
lib/dynbuf.h
lib/llist.c
lib/llist.h
lib/setopt.c
lib/share.c
lib/share.h
lib/transfer.c
lib/urldata.h
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_osslq.c
lib/vquic/curl_quiche.c
lib/vquic/vquic-tls.c
lib/vquic/vquic-tls.h
lib/vtls/bearssl.c
lib/vtls/gtls.c
lib/vtls/gtls.h
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/openssl.h
lib/vtls/schannel.c
lib/vtls/sectransp.c
lib/vtls/vtls.c
lib/vtls/vtls.h
lib/vtls/vtls_int.h
lib/vtls/vtls_scache.c [new file with mode: 0644]
lib/vtls/vtls_scache.h [new file with mode: 0644]
lib/vtls/wolfssl.c
lib/vtls/wolfssl.h
tests/http/test_02_download.py
tests/http/test_14_auth.py