From aedbb67da548df0585f48b0c49d758c2366fea7f Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 23 Apr 2023 18:59:41 +0000 Subject: Fix the client test and the tlsext test to work with randomized TLS extensions (this involves unrandomizing the extension order for the tests that rely on golden numbers. --- src/regress/lib/libssl/client/clienttest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/regress/lib/libssl/client/clienttest.c') diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index b0486d95f0..8ecc54467f 100644 --- a/src/regress/lib/libssl/client/clienttest.c +++ b/src/regress/lib/libssl/client/clienttest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clienttest.c,v 1.39 2022/07/19 20:16:50 tb Exp $ */ +/* $OpenBSD: clienttest.c,v 1.40 2023/04/23 18:59:41 tb Exp $ */ /* * Copyright (c) 2015 Joel Sing * @@ -41,6 +41,8 @@ #define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000) +int tlsext_linearize_build_order(SSL *); + static const uint8_t cipher_list_dtls1[] = { 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x39, 0xff, 0x85, 0x00, 0x88, 0x00, 0x81, 0x00, 0x35, 0x00, 0x84, @@ -649,6 +651,11 @@ client_hello_test(int testno, const struct client_hello_test *cht) goto failure; } + if (!tlsext_linearize_build_order(ssl)) { + fprintf(stderr, "failed to linearize build order"); + goto failure; + } + BIO_up_ref(rbio); BIO_up_ref(wbio); SSL_set_bio(ssl, rbio, wbio); -- cgit v1.2.3-55-g6feb