From ef17ac0211ddd486127e1f94756fbb3fd704a9b4 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Thu, 2 Dec 2021 20:32:36 +0300 Subject: [PATCH] BN_zero -> BN_set_word --- src/key.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; } -- 1.7.1