From 7da2be0cb9601ed25460c83aa4d44052b967ba0f Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Tue, 31 Mar 2015 22:59:01 +0000 Subject: upstream commit adapt to recent hostfile.c change: when parsing known_hosts without fully parsing the keys therein, hostkeys_foreach() will now correctly identify KEY_RSA1 keys; ok markus@ miod@ --- regress/unittests/hostkeys/test_iterate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'regress/unittests') diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c index d81291b68..2eaaf063a 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.3 2015/03/07 04:41:48 djm Exp $ */ +/* $OpenBSD: test_iterate.c,v 1.4 2015/03/31 22:59:01 djm Exp $ */ /* * Regress test for hostfile.h hostkeys_foreach() * @@ -91,8 +91,8 @@ check(struct hostkey_foreach_line *l, void *_ctx) expected->l.keytype : expected->no_parse_keytype; #ifndef WITH_SSH1 - if (expected->l.keytype == KEY_RSA1 || - expected->no_parse_keytype == KEY_RSA1) { + if (parse_key && (expected->l.keytype == KEY_RSA1 || + expected->no_parse_keytype == KEY_RSA1)) { expected_status = HKF_STATUS_INVALID; expected_keytype = KEY_UNSPEC; parse_key = 0; -- cgit v1.2.3 From 368f83c793275faa2c52f60eaa9bdac155c4254b Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Wed, 22 Apr 2015 01:38:36 +0000 Subject: upstream commit use correct key for nested certificate test --- regress/unittests/sshkey/test_sshkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'regress/unittests') diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c index ad10c9be2..4453a8599 100644 --- a/regress/unittests/sshkey/test_sshkey.c +++ b/regress/unittests/sshkey/test_sshkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_sshkey.c,v 1.3 2015/01/26 06:11:28 djm Exp $ */ +/* $OpenBSD: test_sshkey.c,v 1.4 2015/04/22 01:38:36 djm Exp $ */ /* * Regress test for sshkey.h key management API * @@ -505,7 +505,7 @@ sshkey_tests(void) ASSERT_INT_EQ(sshkey_load_cert(test_data_file("rsa_1"), &k1), 0); ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_1.pub"), &k2, NULL), 0); - k3 = get_private("ed25519_2"); + k3 = get_private("rsa_1"); build_cert(b, k2, "ssh-rsa-cert-v01@openssh.com", k3, k1); ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k4), SSH_ERR_KEY_CERT_INVALID_SIGN_KEY); -- cgit v1.2.3