From 40bd3709dddaae3a1b6113748bec3faa6a607531 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 7 Oct 2021 15:55:49 +1100 Subject: [PATCH] Skip SK unit tests when built without security-key --- regress/unittests/sshkey/test_file.c | 2 ++ regress/unittests/sshsig/tests.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c index 7d767336e..deb3ec125 100644 --- a/regress/unittests/sshkey/test_file.c +++ b/regress/unittests/sshkey/test_file.c @@ -422,6 +422,7 @@ sshkey_file_tests(void) sshkey_free(k1); +#ifdef ENABLE_SK #if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) TEST_START("parse ECDSA-SK from private"); buf = load_file("ecdsa_sk1"); @@ -552,6 +553,7 @@ sshkey_file_tests(void) TEST_DONE(); sshkey_free(k1); +#endif /* ENABLE_SK */ sshbuf_free(pw); diff --git a/regress/unittests/sshsig/tests.c b/regress/unittests/sshsig/tests.c index bf59d58d1..48db08bfb 100644 --- a/regress/unittests/sshsig/tests.c +++ b/regress/unittests/sshsig/tests.c @@ -117,6 +117,7 @@ tests(void) check_sig("ed25519.pub", "ed25519.sig", msg, namespace); TEST_DONE(); +#ifdef ENABLE_SK #if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) TEST_START("check ECDSA-SK signature"); check_sig("ecdsa_sk.pub", "ecdsa_sk.sig", msg, namespace); @@ -133,6 +134,7 @@ tests(void) msg, namespace); TEST_DONE(); #endif +#endif /* ENABLE_SK */ sshbuf_free(msg); free(namespace);