summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_recp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_recp.c')
-rw-r--r--src/lib/libcrypto/bn/bn_recp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_recp.c b/src/lib/libcrypto/bn/bn_recp.c
index 6277b06dab..8f917e95db 100644
--- a/src/lib/libcrypto/bn/bn_recp.c
+++ b/src/lib/libcrypto/bn/bn_recp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_recp.c,v 1.29 2025/01/22 10:12:01 tb Exp $ */ 1/* $OpenBSD: bn_recp.c,v 1.30 2025/01/22 12:53:16 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 *
@@ -79,6 +79,7 @@ BN_RECP_CTX_create(const BIGNUM *N)
79 79
80 if ((recp->N = BN_dup(N)) == NULL) 80 if ((recp->N = BN_dup(N)) == NULL)
81 goto err; 81 goto err;
82 BN_set_negative(recp->N, 0);
82 recp->num_bits = BN_num_bits(recp->N); 83 recp->num_bits = BN_num_bits(recp->N);
83 84
84 if ((recp->Nr = BN_new()) == NULL) 85 if ((recp->Nr = BN_new()) == NULL)