summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2025-01-06 13:47:37 +0000
committertb <>2025-01-06 13:47:37 +0000
commit050d7b63aec03af589ab579b9e557e982b8fd285 (patch)
tree53b26a13f2cedeb4bd2dd8e410a76903eb4014d4
parent0a040d15f10e359086a81abb9cece058587b248c (diff)
downloadopenbsd-050d7b63aec03af589ab579b9e557e982b8fd285.tar.gz
openbsd-050d7b63aec03af589ab579b9e557e982b8fd285.tar.bz2
openbsd-050d7b63aec03af589ab579b9e557e982b8fd285.zip
BN_div_recp() can't be static since it is directly exercised by bn_test.c
-rw-r--r--src/lib/libcrypto/bn/bn_local.h4
-rw-r--r--src/lib/libcrypto/bn/bn_recp.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h
index bfdff56b0e..310cce2a0e 100644
--- a/src/lib/libcrypto/bn/bn_local.h
+++ b/src/lib/libcrypto/bn/bn_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_local.h,v 1.44 2025/01/06 12:35:27 tb Exp $ */ 1/* $OpenBSD: bn_local.h,v 1.45 2025/01/06 13:47:37 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 *
@@ -284,6 +284,8 @@ void BN_RECP_CTX_init(BN_RECP_CTX *recp);
284BN_RECP_CTX *BN_RECP_CTX_new(void); 284BN_RECP_CTX *BN_RECP_CTX_new(void);
285void BN_RECP_CTX_free(BN_RECP_CTX *recp); 285void BN_RECP_CTX_free(BN_RECP_CTX *recp);
286int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx); 286int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
287int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp,
288 BN_CTX *ctx);
287int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, 289int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
288 BN_RECP_CTX *recp, BN_CTX *ctx); 290 BN_RECP_CTX *recp, BN_CTX *ctx);
289int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 291int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
diff --git a/src/lib/libcrypto/bn/bn_recp.c b/src/lib/libcrypto/bn/bn_recp.c
index c567a5b017..c9a83f8489 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.20 2025/01/06 12:35:27 tb Exp $ */ 1/* $OpenBSD: bn_recp.c,v 1.21 2025/01/06 13:47:37 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 *
@@ -135,7 +135,7 @@ err:
135 return (ret); 135 return (ret);
136} 136}
137 137
138static int 138int
139BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, 139BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp,
140 BN_CTX *ctx) 140 BN_CTX *ctx)
141{ 141{