summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/client
diff options
context:
space:
mode:
authortb <>2023-04-23 18:59:41 +0000
committertb <>2023-04-23 18:59:41 +0000
commitaedbb67da548df0585f48b0c49d758c2366fea7f (patch)
tree8e2ef0fc4362e087ab7be216976b0cd6db4b81a4 /src/regress/lib/libssl/client
parentfb7a7adad4b566192144a21e4c93b739671b0cae (diff)
downloadopenbsd-aedbb67da548df0585f48b0c49d758c2366fea7f.tar.gz
openbsd-aedbb67da548df0585f48b0c49d758c2366fea7f.tar.bz2
openbsd-aedbb67da548df0585f48b0c49d758c2366fea7f.zip
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.
Diffstat (limited to 'src/regress/lib/libssl/client')
-rw-r--r--src/regress/lib/libssl/client/Makefile4
-rw-r--r--src/regress/lib/libssl/client/clienttest.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/regress/lib/libssl/client/Makefile b/src/regress/lib/libssl/client/Makefile
index 5a54f80914..c8a05690a0 100644
--- a/src/regress/lib/libssl/client/Makefile
+++ b/src/regress/lib/libssl/client/Makefile
@@ -1,7 +1,7 @@
1# $OpenBSD: Makefile,v 1.3 2021/08/30 17:34:01 tb Exp $ 1# $OpenBSD: Makefile,v 1.4 2023/04/23 18:59:41 tb Exp $
2 2
3PROG= clienttest 3PROG= clienttest
4LDADD= -lssl -lcrypto 4LDADD= ${SSL_INT} -lcrypto
5DPADD= ${LIBSSL} ${LIBCRYPTO} 5DPADD= ${LIBSSL} ${LIBCRYPTO}
6WARNINGS= Yes 6WARNINGS= Yes
7CFLAGS+= -DLIBRESSL_INTERNAL -Werror 7CFLAGS+= -DLIBRESSL_INTERNAL -Werror
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 @@
1/* $OpenBSD: clienttest.c,v 1.39 2022/07/19 20:16:50 tb Exp $ */ 1/* $OpenBSD: clienttest.c,v 1.40 2023/04/23 18:59:41 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -41,6 +41,8 @@
41 41
42#define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000) 42#define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000)
43 43
44int tlsext_linearize_build_order(SSL *);
45
44static const uint8_t cipher_list_dtls1[] = { 46static const uint8_t cipher_list_dtls1[] = {
45 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x39, 0xff, 0x85, 47 0xc0, 0x14, 0xc0, 0x0a, 0x00, 0x39, 0xff, 0x85,
46 0x00, 0x88, 0x00, 0x81, 0x00, 0x35, 0x00, 0x84, 48 0x00, 0x88, 0x00, 0x81, 0x00, 0x35, 0x00, 0x84,
@@ -649,6 +651,11 @@ client_hello_test(int testno, const struct client_hello_test *cht)
649 goto failure; 651 goto failure;
650 } 652 }
651 653
654 if (!tlsext_linearize_build_order(ssl)) {
655 fprintf(stderr, "failed to linearize build order");
656 goto failure;
657 }
658
652 BIO_up_ref(rbio); 659 BIO_up_ref(rbio);
653 BIO_up_ref(wbio); 660 BIO_up_ref(wbio);
654 SSL_set_bio(ssl, rbio, wbio); 661 SSL_set_bio(ssl, rbio, wbio);