From: tb Date: Tue, 6 Dec 2022 18:23:29 +0000 (+0000) Subject: Add a few missing headers and drop a few unused ones X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=20c8b67d55fe20bcc6261575f5d2ae6ebef4a344;p=openbsd Add a few missing headers and drop a few unused ones In bn_test.c include bn_local.h instead of using copy-pasted prototypes. --- diff --git a/regress/lib/libcrypto/bn/bn_isqrt.c b/regress/lib/libcrypto/bn/bn_isqrt.c index a7303220823..b1cacea1cd2 100644 --- a/regress/lib/libcrypto/bn/bn_isqrt.c +++ b/regress/lib/libcrypto/bn/bn_isqrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_isqrt.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_isqrt.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * @@ -16,6 +16,9 @@ */ #include +#include +#include +#include #include #include diff --git a/regress/lib/libcrypto/bn/bn_mod_sqrt.c b/regress/lib/libcrypto/bn/bn_mod_sqrt.c index e193755b748..7757c2a1cae 100644 --- a/regress/lib/libcrypto/bn/bn_mod_sqrt.c +++ b/regress/lib/libcrypto/bn/bn_mod_sqrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_mod_sqrt.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_mod_sqrt.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * @@ -15,6 +15,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include /* Test that sqrt * sqrt = A (mod p) where p is a prime */ diff --git a/regress/lib/libcrypto/bn/bn_mont.c b/regress/lib/libcrypto/bn/bn_mont.c index d7c8f9581dd..4bcc79d1839 100644 --- a/regress/lib/libcrypto/bn/bn_mont.c +++ b/regress/lib/libcrypto/bn/bn_mont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_mont.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_mont.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2014 Miodrag Vallat. @@ -16,10 +16,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include -#include -#include #include #include diff --git a/regress/lib/libcrypto/bn/bn_primes.c b/regress/lib/libcrypto/bn/bn_primes.c index e9a91ba87a1..cd552dc3ac7 100644 --- a/regress/lib/libcrypto/bn/bn_primes.c +++ b/regress/lib/libcrypto/bn/bn_primes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_primes.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_primes.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * @@ -15,6 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +#include +#include + #include #include "bn_prime.h" diff --git a/regress/lib/libcrypto/bn/bn_test.c b/regress/lib/libcrypto/bn/bn_test.c index c1feddeda1a..ed61f86f2e9 100644 --- a/regress/lib/libcrypto/bn/bn_test.c +++ b/regress/lib/libcrypto/bn/bn_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_test.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_test.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -81,19 +81,9 @@ #include #include -#include #include -int BN_mod_exp_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); -int BN_mod_exp_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); -int BN_mod_exp_mont_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp_mont_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - -int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); +#include "bn_local.h" const int num0 = 100; /* number of tests */ const int num1 = 50; /* additional tests for some functions */ diff --git a/regress/lib/libcrypto/bn/bn_to_string.c b/regress/lib/libcrypto/bn/bn_to_string.c index ca5ca2f08de..2275f98de9d 100644 --- a/regress/lib/libcrypto/bn/bn_to_string.c +++ b/regress/lib/libcrypto/bn/bn_to_string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_to_string.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_to_string.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2019 Theo Buehler * @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/regress/lib/libcrypto/bn/bn_unit.c b/regress/lib/libcrypto/bn/bn_unit.c index b4e4a776de6..1af3e8868d6 100644 --- a/regress/lib/libcrypto/bn/bn_unit.c +++ b/regress/lib/libcrypto/bn/bn_unit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_unit.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */ +/* $OpenBSD: bn_unit.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler @@ -18,6 +18,7 @@ #include #include +#include #include #include