check more precise result of EVP_DigestVerify

This commit is contained in:
orignal 2025-06-12 16:05:17 -04:00
parent 5974d2b5ac
commit bb2b34ff4f
3 changed files with 6 additions and 8 deletions

View file

@ -263,7 +263,7 @@ namespace crypto
auto s = BN_bin2bn (signature + GetSignatureLen ()/2, GetSignatureLen ()/2, NULL);
ECDSA_SIG_set0(sig, r, s);
// ECDSA verification
int ret = ECDSA_do_verify (digest, Hash::hashLen, sig, m_PublicKey);
int ret = ECDSA_do_verify (digest, Hash::hashLen, sig, m_PublicKey) == 1;
ECDSA_SIG_free(sig);
return ret;
}