wolfssl: tls early data support

Enable TLS Early Data for wolfSSL:

- merge WOLFSSL_CTX and WOLFSSL setup from ngtcp2 with the general
  implemenation in wolfssl.c
- enable for QUIC via ngtcp2
- give Curl_vquic_tls_init() a `struct alpn_spec` like used for the TCP
  case. Adapt gnutls and other users.
- enable pytest test cases for early data with wolfSSL

and while this messes up wolfssl.c anyway, do

- rename all struct/functions with prefix 'wolfssl_' to 'wssl_' to not
  pollute that name prefix
- rename `ctx/handle` to `ssl_ctx/ssl`, as used in openssl case

Closes #16167
This commit is contained in:
Stefan Eissing 2025-02-04 15:24:00 +01:00 committed by Daniel Stenberg
parent efec626ebb
commit edd573d980
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
18 changed files with 1117 additions and 804 deletions

View file

@ -577,8 +577,8 @@ class TestDownload:
@pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx")
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
def test_02_32_earlydata(self, env: Env, httpd, nghttpx, proto):
if not env.curl_uses_lib('gnutls'):
pytest.skip('TLS earlydata only implemented in GnuTLS')
if not env.curl_uses_lib('gnutls') and not env.curl_uses_lib('wolfssl'):
pytest.skip('TLS earlydata only implemented in GnuTLS/wolfSSL')
if proto == 'h3' and not env.have_h3():
pytest.skip("h3 not supported")
count = 2

View file

@ -703,8 +703,8 @@ class TestUpload:
# of 128K.
])
def test_07_70_put_earlydata(self, env: Env, httpd, nghttpx, proto, upload_size, exp_early):
if not env.curl_uses_lib('gnutls'):
pytest.skip('TLS earlydata only implemented in GnuTLS')
if not env.curl_uses_lib('gnutls') and not env.curl_uses_lib('wolfssl'):
pytest.skip('TLS earlydata only implemented in GnuTLS/wolfSSL')
if proto == 'h3' and not env.have_h3():
pytest.skip("h3 not supported")
count = 2

View file

@ -207,8 +207,8 @@ class TestCaddy:
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
def test_08_08_earlydata(self, env: Env, httpd, caddy, proto):
if not env.curl_uses_lib('gnutls'):
pytest.skip('TLS earlydata only implemented in GnuTLS')
if not env.curl_uses_lib('gnutls') and not env.curl_uses_lib('wolfssl'):
pytest.skip('TLS earlydata only implemented in GnuTLS/wolfSSL')
if proto == 'h3' and not env.have_h3():
pytest.skip("h3 not supported")
count = 2

View file

@ -57,6 +57,7 @@ class TestShutdown:
def test_19_01_check_tcp_rst(self, env: Env, httpd, proto):
if env.ci_run:
pytest.skip("seems not to work in CI")
# timing critical, disable trace overrides
run_env = os.environ.copy()
if 'CURL_DEBUG' in run_env:
del run_env['CURL_DEBUG']