diff options
author | Pauli <paul.dale@oracle.com> | 2017-05-08 12:09:41 +1000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-05-09 21:30:29 +0200 |
commit | dc352c193755525292310c8992e3c9b81a556a31 (patch) | |
tree | 9ff9ee27744faf975cabca0120b05c791cb43ccd /test/ecdsatest.c | |
parent | 5e3766e2f15b3a8ea696b194c32a141cbe668d4e (diff) |
Add BN support to the test infrastructure.
This includes support for:
- comparisions between pairs of BIGNUMs
- comparisions between BIGNUMs and zero
- equality comparison between BIGNUMs and one
- equality comparisons between BIGNUMs and constants
- parity checks for BIGNUMs
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3405)
Diffstat (limited to 'test/ecdsatest.c')
-rw-r--r-- | test/ecdsatest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ecdsatest.c b/test/ecdsatest.c index 561ff0c2bd..a3234814d4 100644 --- a/test/ecdsatest.c +++ b/test/ecdsatest.c @@ -167,8 +167,8 @@ static int x9_62_test_internal(int nid, const char *r_in, const char *s_in) if (!TEST_true(BN_dec2bn(&r, r_in)) || !TEST_true(BN_dec2bn(&s, s_in))) goto x962_int_err; ECDSA_SIG_get0(signature, &sig_r, &sig_s); - if (!TEST_int_eq(BN_cmp(sig_r, r), 0) - || !TEST_int_eq(BN_cmp(sig_s, s), 0)) + if (!TEST_BN_eq(sig_r, r) + || !TEST_BN_eq(sig_s, s)) goto x962_int_err; /* verify the signature */ |