BN_zero -> BN_set_word
[novacoin.git] / src / key.cpp
index 0aaa948..94a54ef 100644 (file)
@@ -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; }