From: CryptoManiac Date: Thu, 2 Dec 2021 17:32:36 +0000 (+0300) Subject: BN_zero -> BN_set_word X-Git-Tag: nvc-v0.5.9~111 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=ef17ac0211ddd486127e1f94756fbb3fd704a9b4;hp=2c8fe8e52af62dbefa802589d97b223677dcb631 BN_zero -> BN_set_word --- diff --git a/src/key.cpp b/src/key.cpp index 0aaa948..94a54ef 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -102,7 +102,7 @@ int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned ch if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; } if (8*msglen > n) BN_rshift(e, e, 8-(n & 7)); zero = BN_CTX_get(ctx); - BN_zero(zero); + if (!BN_set_word(zero, 0)) { ret=-1; goto err; } if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; } rr = BN_CTX_get(ctx); if (!BN_mod_inverse(rr, ecsig_r, order, ctx)) { ret=-1; goto err; }