diff options
Diffstat (limited to 'src/regress/lib/libssl/tlsext')
-rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index 923c50d5aa..f5241c8f62 100644 --- a/src/regress/lib/libssl/tlsext/tlsexttest.c +++ b/src/regress/lib/libssl/tlsext/tlsexttest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tlsexttest.c,v 1.79 2022/11/26 16:08:57 tb Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.80 2023/04/23 18:59:41 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
@@ -36,6 +36,7 @@ struct tls_extension_funcs { | |||
36 | const struct tls_extension *tls_extension_find(uint16_t, size_t *); | 36 | const struct tls_extension *tls_extension_find(uint16_t, size_t *); |
37 | const struct tls_extension_funcs *tlsext_funcs(const struct tls_extension *, | 37 | const struct tls_extension_funcs *tlsext_funcs(const struct tls_extension *, |
38 | int); | 38 | int); |
39 | int tlsext_linearize_build_order(SSL *); | ||
39 | 40 | ||
40 | static int | 41 | static int |
41 | tls_extension_funcs(int type, const struct tls_extension_funcs **client_funcs, | 42 | tls_extension_funcs(int type, const struct tls_extension_funcs **client_funcs, |
@@ -3223,6 +3224,11 @@ test_tlsext_clienthello_build(void) | |||
3223 | goto err; | 3224 | goto err; |
3224 | } | 3225 | } |
3225 | 3226 | ||
3227 | if (!tlsext_linearize_build_order(ssl)) { | ||
3228 | FAIL("failed to linearize build order"); | ||
3229 | goto err; | ||
3230 | } | ||
3231 | |||
3226 | if (!tls_extension_funcs(TLSEXT_TYPE_supported_versions, &client_funcs, | 3232 | if (!tls_extension_funcs(TLSEXT_TYPE_supported_versions, &client_funcs, |
3227 | &server_funcs)) | 3233 | &server_funcs)) |
3228 | errx(1, "failed to fetch supported versions funcs"); | 3234 | errx(1, "failed to fetch supported versions funcs"); |
@@ -3339,6 +3345,10 @@ test_tlsext_serverhello_build(void) | |||
3339 | FAIL("failed to create SSL"); | 3345 | FAIL("failed to create SSL"); |
3340 | goto err; | 3346 | goto err; |
3341 | } | 3347 | } |
3348 | if (!tlsext_linearize_build_order(ssl)) { | ||
3349 | FAIL("failed to linearize build order"); | ||
3350 | goto err; | ||
3351 | } | ||
3342 | if ((ssl->session = SSL_SESSION_new()) == NULL) { | 3352 | if ((ssl->session = SSL_SESSION_new()) == NULL) { |
3343 | FAIL("failed to create session"); | 3353 | FAIL("failed to create session"); |
3344 | goto err; | 3354 | goto err; |