summaryrefslogtreecommitdiff
path: root/src/regress/lib/libtls/config/configtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libtls/config/configtest.c')
-rw-r--r--src/regress/lib/libtls/config/configtest.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/regress/lib/libtls/config/configtest.c b/src/regress/lib/libtls/config/configtest.c
index 5af5b56ffd..9e0df8a5eb 100644
--- a/src/regress/lib/libtls/config/configtest.c
+++ b/src/regress/lib/libtls/config/configtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: configtest.c,v 1.3 2023/07/02 06:37:27 beck Exp $ */ 1/* $OpenBSD: configtest.c,v 1.4 2024/08/02 15:02:22 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -71,27 +71,30 @@ struct parse_protocols_test parse_protocols_tests[] = {
71 { 71 {
72 .protostr = "tlsv1.0:tlsv1.1:tlsv1.2:tlsv1.3", 72 .protostr = "tlsv1.0:tlsv1.1:tlsv1.2:tlsv1.3",
73 .want_return = 0, 73 .want_return = 0,
74 .want_protocols = TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3, 74 .want_protocols = TLS_PROTOCOL_TLSv1_0 | TLS_PROTOCOL_TLSv1_1 |
75 TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3,
75 }, 76 },
76 { 77 {
77 .protostr = "tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3", 78 .protostr = "tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3",
78 .want_return = 0, 79 .want_return = 0,
79 .want_protocols = TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3, 80 .want_protocols = TLS_PROTOCOL_TLSv1_0 | TLS_PROTOCOL_TLSv1_1 |
81 TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3,
80 }, 82 },
81 { 83 {
82 .protostr = "tlsv1.1,tlsv1.2,tlsv1.0", 84 .protostr = "tlsv1.1,tlsv1.2,tlsv1.0",
83 .want_return = 0, 85 .want_return = 0,
84 .want_protocols = TLS_PROTOCOL_TLSv1_2, 86 .want_protocols = TLS_PROTOCOL_TLSv1_0 | TLS_PROTOCOL_TLSv1_1 |
87 TLS_PROTOCOL_TLSv1_2,
85 }, 88 },
86 { 89 {
87 .protostr = "tlsv1.1,tlsv1.2,tlsv1.1", 90 .protostr = "tlsv1.1,tlsv1.2,tlsv1.1",
88 .want_return = 0, 91 .want_return = 0,
89 .want_protocols = TLS_PROTOCOL_TLSv1_2, 92 .want_protocols = TLS_PROTOCOL_TLSv1_1 | TLS_PROTOCOL_TLSv1_2,
90 }, 93 },
91 { 94 {
92 .protostr = "tlsv1.1,tlsv1.2,!tlsv1.1", 95 .protostr = "tlsv1.1,tlsv1.2,!tlsv1.1",
93 .want_return = 0, 96 .want_return = 0,
94 .want_protocols = 0, 97 .want_protocols = TLS_PROTOCOL_TLSv1_2,
95 }, 98 },
96 { 99 {
97 .protostr = "unknown", 100 .protostr = "unknown",
@@ -111,17 +114,19 @@ struct parse_protocols_test parse_protocols_tests[] = {
111 { 114 {
112 .protostr = "all,!tlsv1.0", 115 .protostr = "all,!tlsv1.0",
113 .want_return = 0, 116 .want_return = 0,
114 .want_protocols = TLS_PROTOCOL_TLSv1_3, 117 .want_protocols = TLS_PROTOCOL_TLSv1_1 | TLS_PROTOCOL_TLSv1_2 | \
118 TLS_PROTOCOL_TLSv1_3,
115 }, 119 },
116 { 120 {
117 .protostr = "!tlsv1.0", 121 .protostr = "!tlsv1.0",
118 .want_return = 0, 122 .want_return = 0,
119 .want_protocols = TLS_PROTOCOL_TLSv1_3, 123 .want_protocols = TLS_PROTOCOL_TLSv1_1 | TLS_PROTOCOL_TLSv1_2 | \
124 TLS_PROTOCOL_TLSv1_3,
120 }, 125 },
121 { 126 {
122 .protostr = "!tlsv1.0,!tlsv1.1,!tlsv1.3", 127 .protostr = "!tlsv1.0,!tlsv1.1,!tlsv1.3",
123 .want_return = 0, 128 .want_return = 0,
124 .want_protocols = 0, 129 .want_protocols = TLS_PROTOCOL_TLSv1_2,
125 }, 130 },
126 { 131 {
127 .protostr = "!tlsv1.0,!tlsv1.1,tlsv1.2,!tlsv1.3", 132 .protostr = "!tlsv1.0,!tlsv1.1,tlsv1.2,!tlsv1.3",