summaryrefslogtreecommitdiff
path: root/regress/unittests/sshkey/test_fuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/sshkey/test_fuzz.c')
-rw-r--r--regress/unittests/sshkey/test_fuzz.c14
1 files changed, 10 insertions, 4 deletions
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)
113 struct fuzz *fuzz; 113 struct fuzz *fuzz;
114 int r, i; 114 int r, i;
115 115
116 116#ifdef WITH_OPENSSL
117 TEST_START("fuzz RSA private"); 117 TEST_START("fuzz RSA private");
118 buf = load_file("rsa_1"); 118 buf = load_file("rsa_1");
119 fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf), 119 fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
@@ -246,7 +246,8 @@ sshkey_fuzz_tests(void)
246 sshbuf_free(fuzzed); 246 sshbuf_free(fuzzed);
247 fuzz_cleanup(fuzz); 247 fuzz_cleanup(fuzz);
248 TEST_DONE(); 248 TEST_DONE();
249#endif 249#endif /* OPENSSL_HAS_ECC */
250#endif /* WITH_OPENSSL */
250 251
251 TEST_START("fuzz Ed25519 private"); 252 TEST_START("fuzz Ed25519 private");
252 buf = load_file("ed25519_1"); 253 buf = load_file("ed25519_1");
@@ -270,6 +271,7 @@ sshkey_fuzz_tests(void)
270 fuzz_cleanup(fuzz); 271 fuzz_cleanup(fuzz);
271 TEST_DONE(); 272 TEST_DONE();
272 273
274#ifdef WITH_OPENSSL
273 TEST_START("fuzz RSA public"); 275 TEST_START("fuzz RSA public");
274 buf = load_file("rsa_1"); 276 buf = load_file("rsa_1");
275 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); 277 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
@@ -312,7 +314,8 @@ sshkey_fuzz_tests(void)
312 public_fuzz(k1); 314 public_fuzz(k1);
313 sshkey_free(k1); 315 sshkey_free(k1);
314 TEST_DONE(); 316 TEST_DONE();
315#endif 317#endif /* OPENSSL_HAS_ECC */
318#endif /* WITH_OPENSSL */
316 319
317 TEST_START("fuzz Ed25519 public"); 320 TEST_START("fuzz Ed25519 public");
318 buf = load_file("ed25519_1"); 321 buf = load_file("ed25519_1");
@@ -328,6 +331,7 @@ sshkey_fuzz_tests(void)
328 sshkey_free(k1); 331 sshkey_free(k1);
329 TEST_DONE(); 332 TEST_DONE();
330 333
334#ifdef WITH_OPENSSL
331 TEST_START("fuzz RSA sig"); 335 TEST_START("fuzz RSA sig");
332 buf = load_file("rsa_1"); 336 buf = load_file("rsa_1");
333 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); 337 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
@@ -368,7 +372,8 @@ sshkey_fuzz_tests(void)
368 sig_fuzz(k1, NULL); 372 sig_fuzz(k1, NULL);
369 sshkey_free(k1); 373 sshkey_free(k1);
370 TEST_DONE(); 374 TEST_DONE();
371#endif 375#endif /* OPENSSL_HAS_ECC */
376#endif /* WITH_OPENSSL */
372 377
373 TEST_START("fuzz Ed25519 sig"); 378 TEST_START("fuzz Ed25519 sig");
374 buf = load_file("ed25519_1"); 379 buf = load_file("ed25519_1");
@@ -379,5 +384,6 @@ sshkey_fuzz_tests(void)
379 TEST_DONE(); 384 TEST_DONE();
380 385
381/* XXX fuzz decoded new-format blobs too */ 386/* XXX fuzz decoded new-format blobs too */
387/* XXX fuzz XMSS too */
382 388
383} 389}