From 28145d1e488591baa1544caec7c0ef6d45c045ac Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Sun, 19 Feb 2017 23:48:01 +0800 Subject: [PATCH] bug fix --- crypto/ec/ecdsa_ossl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ec/ecdsa_ossl.c b/crypto/ec/ecdsa_ossl.c index d5916909..a483bdfa 100644 --- a/crypto/ec/ecdsa_ossl.c +++ b/crypto/ec/ecdsa_ossl.c @@ -410,7 +410,7 @@ int ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len, ECerr(EC_F_OSSL_ECDSA_VERIFY_SIG, ERR_R_BN_LIB); goto err; } - if (BN_cmp(sig->r, m) <= 0) { + if (BN_cmp(sig->s, m) <= 0) { ECerr(EC_F_OSSL_ECDSA_VERIFY_SIG, EC_R_BAD_SIGNATURE); ret = 0; goto err;