diff options
author | Bodo Möller <bodo@openssl.org> | 2002-11-04 13:17:22 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-11-04 13:17:22 +0000 |
commit | b53e44e57259b2b015c54de8ecbcf4e06be23298 (patch) | |
tree | 4d06528db2e5e7d8ad1680fc59159a4c689c7b3c /crypto/ecdsa | |
parent | e5f4d8279dccad0f6dde324f52333291739dcca3 (diff) |
implement and use new macros BN_get_sign(), BN_set_sign()
Submitted by: Nils Larsch
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r-- | crypto/ecdsa/ecs_ossl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c index a9814afe0b..215da3892a 100644 --- a/crypto/ecdsa/ecs_ossl.c +++ b/crypto/ecdsa/ecs_ossl.c @@ -353,13 +353,15 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, goto err; } - if (BN_is_zero(sig->r) || sig->r->neg || BN_ucmp(sig->r, order) >= 0) + if (BN_is_zero(sig->r) || BN_get_sign(sig->r) || + BN_ucmp(sig->r, order) >= 0) { ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; goto err; } - if (BN_is_zero(sig->s) || sig->s->neg || BN_ucmp(sig->s, order) >= 0) + if (BN_is_zero(sig->s) || BN_get_sign(sig->s) || + BN_ucmp(sig->s, order) >= 0) { ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; |