Skip SK unit tests when built without security-key

This commit is contained in:
Darren Tucker 2021-10-07 15:55:49 +11:00
parent 482f73be10
commit 40bd3709dd
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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);