summaryrefslogtreecommitdiff
path: root/crypto/bn/bn_recp.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-02-24 23:37:15 +0000
committerUlf Möller <ulf@openssl.org>2000-02-24 23:37:15 +0000
commitc04949e97877c7e9e362ab3022b2e7d4988b3e37 (patch)
tree4c0e56a0ce30747dd94d84c9b187a2389afb9faf /crypto/bn/bn_recp.c
parent505b5a0ee07468454d602df07bdb8f1aa4c6fce0 (diff)
downloadopenssl-new-c04949e97877c7e9e362ab3022b2e7d4988b3e37.tar.gz
work around a bug in BN_div_recp or BN_reciprocal
Diffstat (limited to 'crypto/bn/bn_recp.c')
-rw-r--r--crypto/bn/bn_recp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c
index 80539c5e2c..bc0787d75a 100644
--- a/crypto/bn/bn_recp.c
+++ b/crypto/bn/bn_recp.c
@@ -191,7 +191,16 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, BN_RECP_CTX *recp,
{
if (j++ > 2)
{
+#if 1
+ /* work around some bug:
+ -1CC0E177F93042B29D309839F8019DB93404D7A395F1E162
+ 5383BF622A20B17E1BAA999336988B82B93F5FB77B55B4B68
+ 9412000000000031 / 298EB5957DBFB8CBB2CC2A9F789D2B5
+ fails, for example. */
+ ret=BN_div(dv,rem,a,&(recp->N),ctx);
+#else
BNerr(BN_F_BN_MOD_MUL_RECIPROCAL,BN_R_BAD_RECIPROCAL);
+#endif
goto err;
}
if (!BN_usub(r,r,&(recp->N))) goto err;