summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-04-25 15:33:25 +0000
committertb <>2023-04-25 15:33:25 +0000
commit000ddd2f631c7c77a24dd47369d01f079c13e160 (patch)
treedc1d80a6ee0223f3e1edca587dd243299a1017c1 /src
parent9b40b47c808aeeff7b02d8274ba6ad21822fb51b (diff)
downloadopenbsd-000ddd2f631c7c77a24dd47369d01f079c13e160.tar.gz
openbsd-000ddd2f631c7c77a24dd47369d01f079c13e160.tar.bz2
openbsd-000ddd2f631c7c77a24dd47369d01f079c13e160.zip
bn_test: temporarily add prototypes for reciprocal functions
This is a hack needed until bn_local.h is updated
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/bn/bn_test.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_test.c b/src/regress/lib/libcrypto/bn/bn_test.c
index 463e30dfe1..528238025d 100644
--- a/src/regress/lib/libcrypto/bn/bn_test.c
+++ b/src/regress/lib/libcrypto/bn/bn_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_test.c,v 1.17 2023/04/25 15:32:33 tb Exp $ */ 1/* $OpenBSD: bn_test.c,v 1.18 2023/04/25 15:33:25 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,18 @@
79 79
80#include "bn_local.h" 80#include "bn_local.h"
81 81
82/* XXX - remove these once bn_local.h is fixed. */
83void BN_RECP_CTX_init(BN_RECP_CTX *recp);
84BN_RECP_CTX *BN_RECP_CTX_new(void);
85void BN_RECP_CTX_free(BN_RECP_CTX *recp);
86int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
87int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
88 BN_RECP_CTX *recp, BN_CTX *ctx);
89int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
90 const BIGNUM *m, BN_CTX *ctx);
91int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
92 BN_RECP_CTX *recp, BN_CTX *ctx);
93
82const int num0 = 100; /* number of tests */ 94const int num0 = 100; /* number of tests */
83const int num1 = 50; /* additional tests for some functions */ 95const int num1 = 50; /* additional tests for some functions */
84const int num2 = 5; /* number of tests for slow functions */ 96const int num2 = 5; /* number of tests for slow functions */