diff options
author | Nils Larsch <nils@openssl.org> | 2005-04-22 20:02:44 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-04-22 20:02:44 +0000 |
commit | ff22e913a3fbeb025e612828859102aa1a3effaa (patch) | |
tree | 9b30cca57b4f6fd9436fb222dbd2fe9647bc56a9 /crypto/dsa/dsa_ossl.c | |
parent | 04d0d0accfbfe88cb52c92abf521c69577c8d33e (diff) |
- use BN_set_negative and BN_is_negative instead of BN_set_sign
and BN_get_sign
- implement BN_set_negative as a function
- always use "#define BN_is_zero(a) ((a)->top == 0)"
Diffstat (limited to 'crypto/dsa/dsa_ossl.c')
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index c3ad7a14ab..a37763468a 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -281,13 +281,13 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, if ((ctx=BN_CTX_new()) == NULL) goto err; - if (BN_is_zero(sig->r) || BN_get_sign(sig->r) || + if (BN_is_zero(sig->r) || BN_is_negative(sig->r) || BN_ucmp(sig->r, dsa->q) >= 0) { ret = 0; goto err; } - if (BN_is_zero(sig->s) || BN_get_sign(sig->s) || + if (BN_is_zero(sig->s) || BN_is_negative(sig->s) || BN_ucmp(sig->s, dsa->q) >= 0) { ret = 0; |