summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2014-06-10 22:27:16 +0200
committerDarren Tucker <dtucker@zip.com.au>2014-06-10 22:27:16 +0200
commit67508ac2563c33d582be181a3e777c65f549d22f (patch)
tree7d783949caa53394992cf8918a221043645d11c4 /regress
parent - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c] (diff)
downloadopenssh-67508ac2563c33d582be181a3e777c65f549d22f.tar.xz
openssh-67508ac2563c33d582be181a3e777c65f549d22f.zip
- (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.
Diffstat (limited to 'regress')
-rw-r--r--regress/unittests/sshbuf/test_sshbuf_getput_crypto.c4
-rw-r--r--regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
index 53290a64c..4f3b5a8ea 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 eed2d6025..a5e577d3f 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);
}