]> git.ipfire.org Git - thirdparty/openssl.git/commit
statem: add direct tests for tls_construct_client_hello
authorJakub Zelenka <jakub.zelenka@openssl.foundation>
Fri, 19 Jun 2026 16:52:37 +0000 (18:52 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Tue, 30 Jun 2026 08:54:38 +0000 (10:54 +0200)
commitc36a9b463e765001c2d558bb73f06b0bf8612158
tree1f87b6978aa8002ceac1cf3627bc0fecbd47742c
parent7d4475bdf251bae7ed504e96230dcf12d7329f6d
statem: add direct tests for tls_construct_client_hello

Add a new test which calls tls_construct_client_hello() directly,
creating an SSL_CONNECTION enough to invoke the construct function
without making a full handshake, then verifies the produced
ClientHello structurally and by round-tripping it through the
server-side tls_process_client_hello().

The covered branches include TLS 1.3 (with and without middlebox
compat), TLS 1.2, DTLS, session resumption, HelloRetryRequest, the DTLS
cookie and client_random reuse paths, the deterministic error branches
(WPACKET overflow and no usable ciphers), and the ECH wrapper path
(happy path with server-side decryption, the TLS 1.2 version error, and
OOM). Out-of-memory branches are exercised with the mfail tests.

Assisted-by: Claude:claude-opus-4-8
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Daniel Kubec <kubec@openssl.foundation>
MergeDate: Tue Jun 30 08:54:48 2026
(Merged from https://github.com/openssl/openssl/pull/31618)
test/build.info
test/recipes/25-test_statem_clnt.t [new file with mode: 0644]
test/statem_clnt_construct_test.c [new file with mode: 0644]