diff options
author | Mike DePaulo <mikedep333@gmail.com> | 2014-10-18 19:59:47 -0400 |
---|---|---|
committer | Mike DePaulo <mikedep333@gmail.com> | 2014-10-18 20:57:02 -0400 |
commit | 8aa7b05b29941b07940857ff6f60bcc60eaa59a9 (patch) | |
tree | acf3d988cfbd1977723f93285bda5152d096b92e /openssl/crypto/bn/bn_exp.c | |
parent | d2d01e39531d9fb823b2271244c324aad0a6575d (diff) | |
download | vcxsrv-8aa7b05b29941b07940857ff6f60bcc60eaa59a9.tar.gz vcxsrv-8aa7b05b29941b07940857ff6f60bcc60eaa59a9.tar.bz2 vcxsrv-8aa7b05b29941b07940857ff6f60bcc60eaa59a9.zip |
Update openssl to version openssl-1.0.1j
Conflicts:
openssl/Makefile
openssl/crypto/opensslconf.h
Diffstat (limited to 'openssl/crypto/bn/bn_exp.c')
-rw-r--r-- | openssl/crypto/bn/bn_exp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openssl/crypto/bn/bn_exp.c b/openssl/crypto/bn/bn_exp.c index 5e7eb3373..611fa3262 100644 --- a/openssl/crypto/bn/bn_exp.c +++ b/openssl/crypto/bn/bn_exp.c @@ -874,7 +874,14 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, bits = BN_num_bits(p); if (bits == 0) { - ret = BN_one(rr); + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) + { + ret = 1; + BN_zero(rr); + } + else + ret = BN_one(rr); return ret; } if (a == 0) |