summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2026-05-30 17:04:48 +0000
committerjsing <>2026-05-30 17:04:48 +0000
commit675fd74282cd55958ad228fe38c51eea55f6418b (patch)
tree01a83cc4801a3a658ec80e681d7b6a2da85420d4 /src
parente1ba3cf88c6e568c66f3e8495b4a188af7e3dd62 (diff)
downloadopenbsd-675fd74282cd55958ad228fe38c51eea55f6418b.tar.gz
openbsd-675fd74282cd55958ad228fe38c51eea55f6418b.tar.bz2
openbsd-675fd74282cd55958ad228fe38c51eea55f6418b.zip
Add a regress test that matches a wildcard for a TLD specified as a FQDN.
This currently matches when we should reject it.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libtls/verify/verifytest.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/regress/lib/libtls/verify/verifytest.c b/src/regress/lib/libtls/verify/verifytest.c
index 9a5aa14076..72b8e4fd83 100644
--- a/src/regress/lib/libtls/verify/verifytest.c
+++ b/src/regress/lib/libtls/verify/verifytest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: verifytest.c,v 1.9 2026/05/30 16:55:09 jsing Exp $ */ 1/* $OpenBSD: verifytest.c,v 1.10 2026/05/30 17:04:48 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -125,6 +125,14 @@ struct verify_test verify_tests[] = {
125 .want_match = 0, 125 .want_match = 0,
126 }, 126 },
127 { 127 {
128 /* CN wildcard without SANs - invalid CN wildcard. */
129 .common_name = "*.org.",
130 .common_name_len = -1,
131 .name = "openbsd.org.",
132 .want_return = 0,
133 .want_match = 0,
134 },
135 {
128 /* CN IPv4 without SANs - matching. */ 136 /* CN IPv4 without SANs - matching. */
129 .common_name = "1.2.3.4", 137 .common_name = "1.2.3.4",
130 .common_name_len = -1, 138 .common_name_len = -1,