From f61f29afda6c71eda26effa54d3c2e5306fd0833 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 7 Sep 2019 19:25:00 +1000 Subject: make unittests pass for no-openssl case --- regress/unittests/sshkey/test_fuzz.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'regress/unittests/sshkey/test_fuzz.c') diff --git a/regress/unittests/sshkey/test_fuzz.c b/regress/unittests/sshkey/test_fuzz.c index 5953de595..1323f8997 100644 --- a/regress/unittests/sshkey/test_fuzz.c +++ b/regress/unittests/sshkey/test_fuzz.c @@ -113,7 +113,7 @@ sshkey_fuzz_tests(void) struct fuzz *fuzz; int r, i; - +#ifdef WITH_OPENSSL TEST_START("fuzz RSA private"); buf = load_file("rsa_1"); fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf), @@ -246,7 +246,8 @@ sshkey_fuzz_tests(void) sshbuf_free(fuzzed); fuzz_cleanup(fuzz); TEST_DONE(); -#endif +#endif /* OPENSSL_HAS_ECC */ +#endif /* WITH_OPENSSL */ TEST_START("fuzz Ed25519 private"); buf = load_file("ed25519_1"); @@ -270,6 +271,7 @@ sshkey_fuzz_tests(void) fuzz_cleanup(fuzz); TEST_DONE(); +#ifdef WITH_OPENSSL TEST_START("fuzz RSA public"); buf = load_file("rsa_1"); ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); @@ -312,7 +314,8 @@ sshkey_fuzz_tests(void) public_fuzz(k1); sshkey_free(k1); TEST_DONE(); -#endif +#endif /* OPENSSL_HAS_ECC */ +#endif /* WITH_OPENSSL */ TEST_START("fuzz Ed25519 public"); buf = load_file("ed25519_1"); @@ -328,6 +331,7 @@ sshkey_fuzz_tests(void) sshkey_free(k1); TEST_DONE(); +#ifdef WITH_OPENSSL TEST_START("fuzz RSA sig"); buf = load_file("rsa_1"); ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); @@ -368,7 +372,8 @@ sshkey_fuzz_tests(void) sig_fuzz(k1, NULL); sshkey_free(k1); TEST_DONE(); -#endif +#endif /* OPENSSL_HAS_ECC */ +#endif /* WITH_OPENSSL */ TEST_START("fuzz Ed25519 sig"); buf = load_file("ed25519_1"); @@ -379,5 +384,6 @@ sshkey_fuzz_tests(void) TEST_DONE(); /* XXX fuzz decoded new-format blobs too */ +/* XXX fuzz XMSS too */ } -- cgit v1.2.3