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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c
index 7aefa7301c..d4a4d60a86 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.26 2022/11/26 16:08:54 tb Exp $ */ 1/* $OpenBSD: rsa_gen.c,v 1.27 2023/03/27 10:22:47 tb 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 *
@@ -131,7 +131,8 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
131 if (!rsa->iqmp && ((rsa->iqmp = BN_new()) == NULL)) 131 if (!rsa->iqmp && ((rsa->iqmp = BN_new()) == NULL))
132 goto err; 132 goto err;
133 133
134 BN_copy(rsa->e, e_value); 134 if (!bn_copy(rsa->e, e_value))
135 goto err;
135 136
136 /* generate p and q */ 137 /* generate p and q */
137 for (;;) { 138 for (;;) {