diff options
Diffstat (limited to '')
-rw-r--r-- | regress/unittests/hostkeys/test_iterate.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c index 7e5a13018..d81291b68 100644 --- a/regress/unittests/hostkeys/test_iterate.c +++ b/regress/unittests/hostkeys/test_iterate.c @@ -98,6 +98,15 @@ check(struct hostkey_foreach_line *l, void *_ctx) parse_key = 0; } #endif +#ifndef OPENSSL_HAS_ECC + if (expected->l.keytype == KEY_ECDSA || + expected->no_parse_keytype == KEY_ECDSA) { + expected_status = HKF_STATUS_INVALID; + expected_keytype = KEY_UNSPEC; + parse_key = 0; + } +#endif + UPDATE_MATCH_STATUS(match_host_p); UPDATE_MATCH_STATUS(match_host_s); UPDATE_MATCH_STATUS(match_ipv4); @@ -145,6 +154,10 @@ prepare_expected(struct expected *expected, size_t n) if (expected[i].l.keytype == KEY_RSA1) continue; #endif +#ifndef OPENSSL_HAS_ECC + if (expected[i].l.keytype == KEY_ECDSA) + continue; +#endif ASSERT_INT_EQ(sshkey_load_public( test_data_file(expected[i].key_file), &expected[i].l.key, NULL), 0); @@ -178,7 +191,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "DSA #1", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, { NULL, 3, @@ -192,7 +204,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #1", } }, -#endif { "ed25519_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, { NULL, 4, @@ -271,7 +282,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "DSA #2", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, { NULL, 10, @@ -285,7 +295,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #2", } }, -#endif { "ed25519_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, { NULL, 11, @@ -364,7 +373,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "DSA #3", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, { NULL, 17, @@ -378,7 +386,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #3", } }, -#endif { "ed25519_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, { NULL, 18, @@ -457,7 +464,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "DSA #5", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, { NULL, 24, @@ -471,7 +477,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #5", } }, -#endif { "ed25519_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, { NULL, 25, @@ -568,7 +573,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "DSA #6", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, { NULL, 32, @@ -608,7 +612,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #6", } }, -#endif { "ed25519_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, { NULL, 35, @@ -791,7 +794,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ED25519 #4", } }, -#ifdef OPENSSL_HAS_ECC { "ecdsa_4.pub" , -1, -1, HKF_MATCH_HOST, 0, 0, 0, -1, { NULL, 49, @@ -805,7 +807,6 @@ struct expected expected_full[] = { NULL, /* filled at runtime */ "ECDSA #4", } }, -#endif { "dsa_4.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, 0, 0, -1, { NULL, 50, |