summaryrefslogtreecommitdiff
path: root/regress/unittests/sshkey/test_fuzz.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2014-07-23 04:27:50 +1000
committerDarren Tucker <dtucker@zip.com.au>2014-07-23 04:27:50 +1000
commitc4ee219a66f3190fa96cbd45b4d11015685c6306 (patch)
tree33e57c46d9f324bfb7e10a8ff711d1868eaf3967 /regress/unittests/sshkey/test_fuzz.c
parent04f4824940ea3edd60835416ececbae16438968a (diff)
- (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
specific tests inside OPENSSL_HAS_ECC.
Diffstat (limited to 'regress/unittests/sshkey/test_fuzz.c')
-rw-r--r--regress/unittests/sshkey/test_fuzz.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/regress/unittests/sshkey/test_fuzz.c b/regress/unittests/sshkey/test_fuzz.c
index 163e65512..f9da086a4 100644
--- a/regress/unittests/sshkey/test_fuzz.c
+++ b/regress/unittests/sshkey/test_fuzz.c
@@ -231,6 +231,7 @@ sshkey_fuzz_tests(void)
231 fuzz_cleanup(fuzz); 231 fuzz_cleanup(fuzz);
232 TEST_DONE(); 232 TEST_DONE();
233 233
234#ifdef OPENSSL_HAS_ECC
234 TEST_START("fuzz ECDSA private"); 235 TEST_START("fuzz ECDSA private");
235 buf = load_file("ecdsa_1"); 236 buf = load_file("ecdsa_1");
236 fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf), 237 fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
@@ -274,6 +275,7 @@ sshkey_fuzz_tests(void)
274 sshbuf_free(fuzzed); 275 sshbuf_free(fuzzed);
275 fuzz_cleanup(fuzz); 276 fuzz_cleanup(fuzz);
276 TEST_DONE(); 277 TEST_DONE();
278#endif
277 279
278 TEST_START("fuzz Ed25519 private"); 280 TEST_START("fuzz Ed25519 private");
279 buf = load_file("ed25519_1"); 281 buf = load_file("ed25519_1");
@@ -327,6 +329,7 @@ sshkey_fuzz_tests(void)
327 sshkey_free(k1); 329 sshkey_free(k1);
328 TEST_DONE(); 330 TEST_DONE();
329 331
332#ifdef OPENSSL_HAS_ECC
330 TEST_START("fuzz ECDSA public"); 333 TEST_START("fuzz ECDSA public");
331 buf = load_file("ecdsa_1"); 334 buf = load_file("ecdsa_1");
332 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", "key", 335 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", "key",
@@ -341,6 +344,7 @@ sshkey_fuzz_tests(void)
341 public_fuzz(k1); 344 public_fuzz(k1);
342 sshkey_free(k1); 345 sshkey_free(k1);
343 TEST_DONE(); 346 TEST_DONE();
347#endif
344 348
345 TEST_START("fuzz Ed25519 public"); 349 TEST_START("fuzz Ed25519 public");
346 buf = load_file("ed25519_1"); 350 buf = load_file("ed25519_1");
@@ -375,6 +379,7 @@ sshkey_fuzz_tests(void)
375 sshkey_free(k1); 379 sshkey_free(k1);
376 TEST_DONE(); 380 TEST_DONE();
377 381
382#ifdef OPENSSL_HAS_ECC
378 TEST_START("fuzz ECDSA sig"); 383 TEST_START("fuzz ECDSA sig");
379 buf = load_file("ecdsa_1"); 384 buf = load_file("ecdsa_1");
380 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", "key", 385 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", "key",
@@ -383,6 +388,7 @@ sshkey_fuzz_tests(void)
383 sig_fuzz(k1); 388 sig_fuzz(k1);
384 sshkey_free(k1); 389 sshkey_free(k1);
385 TEST_DONE(); 390 TEST_DONE();
391#endif
386 392
387 TEST_START("fuzz Ed25519 sig"); 393 TEST_START("fuzz Ed25519 sig");
388 buf = load_file("ed25519_1"); 394 buf = load_file("ed25519_1");