summaryrefslogtreecommitdiff
path: root/regress/lib/libssl
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-07-11 10:09:48 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-07-11 10:09:48 +0000
commit50fc30f5d397c5c511717d40371e9978c6af0d2a (patch)
treedcb9a7e8c2f6ca191ed6b25b264c157a13dbf3f2 /regress/lib/libssl
parent18cb4ccf9bb66a819ea6e27777b7d04a27242bf3 (diff)
Neuter expected server test failures with SSLv2
This test should either be extended or retired. As it is it is useless.
Diffstat (limited to 'regress/lib/libssl')
-rw-r--r--regress/lib/libssl/server/servertest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/regress/lib/libssl/server/servertest.c b/regress/lib/libssl/server/servertest.c
index 3367836dbd2..f13b2601031 100644
--- a/regress/lib/libssl/server/servertest.c
+++ b/regress/lib/libssl/server/servertest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: servertest.c,v 1.7 2022/06/10 22:00:15 tb Exp $ */
+/* $OpenBSD: servertest.c,v 1.8 2023/07/11 10:09:47 tb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Joel Sing <jsing@openbsd.org>
*
@@ -84,6 +84,7 @@ struct server_hello_test {
const SSL_METHOD *(*ssl_method)(void);
const long ssl_clear_options;
const long ssl_set_options;
+ int accept_fails;
};
static struct server_hello_test server_hello_tests[] = {
@@ -94,6 +95,7 @@ static struct server_hello_test server_hello_tests[] = {
.ssl_method = tls_legacy_method,
.ssl_clear_options = SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1,
.ssl_set_options = 0,
+ .accept_fails = 1,
},
{
.desc = "TLSv1.2 in SSLv2 record",
@@ -102,6 +104,7 @@ static struct server_hello_test server_hello_tests[] = {
.ssl_method = tls_legacy_method,
.ssl_clear_options = SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1,
.ssl_set_options = 0,
+ .accept_fails = 1,
},
};
@@ -160,6 +163,8 @@ server_hello_test(int testno, struct server_hello_test *sht)
SSL_set_bio(ssl, rbio, wbio);
if (SSL_accept(ssl) != 0) {
+ if (sht->accept_fails)
+ ret = 0;
fprintf(stderr, "SSL_accept() returned non-zero\n");
ERR_print_errors_fp(stderr);
goto failure;