[openssh-commits] [openssh] 84/87: upstream: unit test for accepting @revoked with tab separation
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Oct 30 20:22:01 AEDT 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit d1d196070f86ccd9ef1479b6d309d6dcef73c5cc
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Oct 30 07:50:02 2026 +0000
upstream: unit test for accepting @revoked with tab separation
Anthropic ANT-2026-LIFVTX5L
OpenBSD-Regress-ID: 0bc5039416160d58e76791ed7f7ce217c3f3679c
---
regress/unittests/hostkeys/mktestdata.sh | 5 ++++-
regress/unittests/hostkeys/test_iterate.c | 16 +++++++++++++++-
regress/unittests/hostkeys/testdata/known_hosts | 1 +
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/regress/unittests/hostkeys/mktestdata.sh b/regress/unittests/hostkeys/mktestdata.sh
index 5fec58298..5565db23d 100644
--- a/regress/unittests/hostkeys/mktestdata.sh
+++ b/regress/unittests/hostkeys/mktestdata.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: mktestdata.sh,v 1.3 2025/05/06 06:05:48 djm Exp $
+# $OpenBSD: mktestdata.sh,v 1.4 2026/10/30 07:50:02 djm Exp $
set -ex
@@ -80,6 +80,9 @@ rm -f known_hosts_hash_frag.old
echo "sisyphus.example.com ssh-XXX AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg=="
# Type mismatch with blob
echo "prometheus.example.com ssh-rsa AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg=="
+
+ # Tab-separated marker line that also contains spaces
+ printf "@revoked\tsisyphus.example.com\t" ; cat ed25519_4.pub
) > known_hosts
echo OK
diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c
index 6281e30df..f2bb4ff73 100644
--- a/regress/unittests/hostkeys/test_iterate.c
+++ b/regress/unittests/hostkeys/test_iterate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_iterate.c,v 1.11 2025/11/17 09:59:13 dtucker Exp $ */
+/* $OpenBSD: test_iterate.c,v 1.12 2026/10/30 07:50:02 djm Exp $ */
/*
* Regress test for hostfile.h hostkeys_foreach()
*
@@ -760,6 +760,20 @@ struct expected expected_full[] = {
NULL,
0,
} },
+ { "ed25519_4.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+ NULL,
+ 43,
+ HKF_STATUS_OK,
+ 0,
+ NULL,
+ MRK_REVOKE,
+ "sisyphus.example.com",
+ NULL,
+ KEY_ED25519,
+ NULL, /* filled at runtime */
+ "ED25519 #4",
+ 0,
+ } },
};
void test_iterate(void);
diff --git a/regress/unittests/hostkeys/testdata/known_hosts b/regress/unittests/hostkeys/testdata/known_hosts
index 5298e3eeb..df7deeab9 100644
--- a/regress/unittests/hostkeys/testdata/known_hosts
+++ b/regress/unittests/hostkeys/testdata/known_hosts
@@ -40,3 +40,4 @@ prometheus.example.com ssh-ed25519
sisyphus.example.com ssh-ed25519 AAAATgAAAAdz
sisyphus.example.com ssh-XXX AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg==
prometheus.example.com ssh-rsa AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg==
+ at revoked sisyphus.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDFP8L9REfN/iYy1KIRtFqSCn3V2+vOCpoZYENFGLdOF ED25519 #4
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list