gnutls: use session cache for QUIC

Add session reuse for QUIC transfers using GnuTLS. This does not include
support for TLS early data, yet.

Fix check of early data support in common GnuTLS init code to not access
the filter context, as the struct varies between TCP and QUIC
connections.

Closes #15265
This commit is contained in:
Stefan Eissing 2024-10-11 13:09:51 +02:00 committed by Daniel Stenberg
parent 954177b9da
commit fe8399f066
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 99 additions and 40 deletions

View file

@ -625,10 +625,16 @@ class TestDownload:
self.check_downloads(client, srcfile, count)
# check that TLS earlydata worked as expected
earlydata = {}
reused_session = False
for line in r.trace_lines:
m = re.match(r'^\[t-(\d+)] EarlyData: (\d+)', line)
if m:
earlydata[int(m.group(1))] = int(m.group(2))
continue
m = re.match(r'\[1-1] \* SSL reusing session.*', line)
if m:
reused_session = True
assert reused_session, 'session was not reused for 2nd transfer'
assert earlydata[0] == 0, f'{earlydata}'
if proto == 'http/1.1':
assert earlydata[1] == 69, f'{earlydata}'