summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_eay.c
diff options
context:
space:
mode:
authormiod <>2014-04-13 15:25:35 +0000
committermiod <>2014-04-13 15:25:35 +0000
commit1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a (patch)
tree74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/rsa/rsa_eay.c
parent92349eb53934e1b3e9b807e603d45417a6320d21 (diff)
downloadopenbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.gz
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.bz2
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.zip
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 2e1ddd48d3..88ee2cb557 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -847,12 +847,12 @@ static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
847 if (!BN_mod(r0,pr1,rsa->p,ctx)) goto err; 847 if (!BN_mod(r0,pr1,rsa->p,ctx)) goto err;
848 848
849 /* If p < q it is occasionally possible for the correction of 849 /* If p < q it is occasionally possible for the correction of
850 * adding 'p' if r0 is negative above to leave the result still 850 * adding 'p' if r0 is negative above to leave the result still
851 * negative. This can break the private key operations: the following 851 * negative. This can break the private key operations: the following
852 * second correction should *always* correct this rare occurrence. 852 * second correction should *always* correct this rare occurrence.
853 * This will *never* happen with OpenSSL generated keys because 853 * This will *never* happen with OpenSSL generated keys because
854 * they ensure p > q [steve] 854 * they ensure p > q [steve]
855 */ 855 */
856 if (BN_is_negative(r0)) 856 if (BN_is_negative(r0))
857 if (!BN_add(r0,r0,rsa->p)) goto err; 857 if (!BN_add(r0,r0,rsa->p)) goto err;
858 if (!BN_mul(r1,r0,rsa->q,ctx)) goto err; 858 if (!BN_mul(r1,r0,rsa->q,ctx)) goto err;