mirror of git://anongit.mindrot.org/openssh.git
- (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.
This commit is contained in:
parent
6482d90a65
commit
67508ac256
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue