summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_gen.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_gen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c
index 300b292b7b..e09dccb4a8 100644
--- a/src/lib/libcrypto/rsa/rsa_gen.c
+++ b/src/lib/libcrypto/rsa/rsa_gen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_gen.c,v 1.20 2017/01/21 11:00:47 beck Exp $ */ 1/* $OpenBSD: rsa_gen.c,v 1.21 2017/01/25 06:15:44 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -138,7 +138,7 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
138 goto err; 138 goto err;
139 if (!BN_sub(r2, rsa->p, BN_value_one())) 139 if (!BN_sub(r2, rsa->p, BN_value_one()))
140 goto err; 140 goto err;
141 if (!BN_gcd(r1, r2, rsa->e, ctx)) 141 if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
142 goto err; 142 goto err;
143 if (BN_is_one(r1)) 143 if (BN_is_one(r1))
144 break; 144 break;
@@ -168,7 +168,7 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
168 } 168 }
169 if (!BN_sub(r2, rsa->q, BN_value_one())) 169 if (!BN_sub(r2, rsa->q, BN_value_one()))
170 goto err; 170 goto err;
171 if (!BN_gcd(r1, r2, rsa->e, ctx)) 171 if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
172 goto err; 172 goto err;
173 if (BN_is_one(r1)) 173 if (BN_is_one(r1))
174 break; 174 break;