diff options
author | Darren Tucker <dtucker@zip.com.au> | 2014-06-11 06:27:16 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2014-06-11 06:27:16 +1000 |
commit | 67508ac2563c33d582be181a3e777c65f549d22f (patch) | |
tree | 7d783949caa53394992cf8918a221043645d11c4 | |
parent | 6482d90a65459a88c18c925368525855832272b3 (diff) |
- (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
curve tests if OpenSSL has them.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_getput_crypto.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c | 2 |
3 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,8 @@ +20140610 + - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c + regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256 + curve tests if OpenSSL has them. + 20140527 - (djm) [cipher.c] Fix merge botch. - (djm) [contrib/cygwin/ssh-host-config] Updated Cygwin ssh-host-config diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c index 53290a64..4f3b5a8e 100644 --- a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c +++ b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c @@ -44,6 +44,7 @@ sshbuf_getput_crypto_tests(void) 0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10, 0x00, 0x7f, 0xff, 0x11 }; +#ifdef OPENSSL_HAS_NISTP256 int ec256_nid = NID_X9_62_prime256v1; char *ec256_x = "0C828004839D0106AA59575216191357" "34B451459DADB586677EF9DF55784999"; @@ -62,6 +63,7 @@ sshbuf_getput_crypto_tests(void) }; EC_KEY *eck; EC_POINT *ecp; +#endif int r; #define MKBN(b, bnn) \ @@ -345,6 +347,7 @@ sshbuf_getput_crypto_tests(void) sshbuf_free(p1); TEST_DONE(); +#ifdef OPENSSL_HAS_NISTP256 TEST_START("sshbuf_put_ec"); eck = EC_KEY_new_by_curve_name(ec256_nid); ASSERT_PTR_NE(eck, NULL); @@ -396,5 +399,6 @@ sshbuf_getput_crypto_tests(void) BN_free(bn); BN_free(bn2); TEST_DONE(); +#endif } diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c index eed2d602..a5e577d3 100644 --- a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c +++ b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c @@ -54,10 +54,12 @@ attempt_parse_blob(u_char *blob, size_t len) bn = BN_new(); sshbuf_get_bignum2(p1, bn); BN_clear_free(bn); +#ifdef OPENSSL_HAS_NISTP256 eck = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); ASSERT_PTR_NE(eck, NULL); sshbuf_get_eckey(p1, eck); EC_KEY_free(eck); +#endif sshbuf_free(p1); } |