summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/bn/Makefile66
-rw-r--r--src/regress/lib/libcrypto/bn/addsub/Makefile11
-rw-r--r--src/regress/lib/libcrypto/bn/bn_add_sub.c (renamed from src/regress/lib/libcrypto/bn/addsub/bnaddsub.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_isqrt.c (renamed from src/regress/lib/libcrypto/bn/general/bn_isqrt.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_mod_exp2_mont.c (renamed from src/regress/lib/libcrypto/bn/general/bn_mod_exp2_mont.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_mod_sqrt.c (renamed from src/regress/lib/libcrypto/bn/general/bn_mod_sqrt.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_mont.c (renamed from src/regress/lib/libcrypto/bn/mont/mont.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_primes.c (renamed from src/regress/lib/libcrypto/bn/general/bn_primes.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_rand_interval.c (renamed from src/regress/lib/libcrypto/bn/rand/bn_rand_interval.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_test.c (renamed from src/regress/lib/libcrypto/bn/general/bntest.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_to_string.c (renamed from src/regress/lib/libcrypto/bn/general/bn_to_string.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/bn_unit.c (renamed from src/regress/lib/libcrypto/bn/general/bn_unit.c)2
-rw-r--r--src/regress/lib/libcrypto/bn/general/Makefile61
-rw-r--r--src/regress/lib/libcrypto/bn/mont/Makefile9
-rw-r--r--src/regress/lib/libcrypto/bn/rand/Makefile11
15 files changed, 62 insertions, 116 deletions
diff --git a/src/regress/lib/libcrypto/bn/Makefile b/src/regress/lib/libcrypto/bn/Makefile
index 89c8d7861a..971ace1c77 100644
--- a/src/regress/lib/libcrypto/bn/Makefile
+++ b/src/regress/lib/libcrypto/bn/Makefile
@@ -1,20 +1,58 @@
1# $OpenBSD: Makefile,v 1.7 2022/11/30 02:51:05 jsing Exp $ 1# $OpenBSD: Makefile,v 1.8 2022/12/01 20:50:10 tb Exp $
2 2
3SUBDIR= \ 3PROGS += bn_add_sub
4 addsub \ 4PROGS += bn_cmp
5 general \ 5PROGS += bn_isqrt
6 mont \ 6PROGS += bn_mod_exp2_mont
7 rand 7PROGS += bn_mod_sqrt
8PROGS += bn_mont
9PROGS += bn_primes
10PROGS += bn_rand_interval
11PROGS += bn_to_string
12PROGS += bn_unit
8 13
9PROGS+= bn_cmp 14STATIC_LINK += bn_isqrt
15STATIC_LINK += bn_primes
16STATIC_LINK += bn_to_string
17STATIC_LINK += bn_rand_interval
10 18
11LDADD= -lcrypto 19LDADD = -lcrypto
12DPADD= ${LIBCRYPTO} 20DPADD = ${LIBCRYPTO}
13WARNINGS= Yes 21WARNINGS = Yes
14CFLAGS+= -Wall -Wundef -Werror 22CFLAGS += -Wall -Wundef -Werror
23CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/bn/
15 24
16REGRESS_TARGETS += run-bn_cmp 25.for p in ${PROGS}
17run-bn_cmp: bn_cmp 26REGRESS_TARGETS += run-$p
18 ./bn_cmp 27.PHONY += run-$p
28
29run-$p: $p
30 ./$p
31.endfor
32
33isqrt-print-tables: bn_isqrt
34 @./bn_isqrt -C
35
36# Keep bn_test last since it is special
37PROGS += bn_test
38STATIC_LINK += bn_test
39CLEANFILES += bn_test.out bc.out
40
41REGRESS_TARGETS += run-bn_test
42.PHONY: run-bn_test
43run-bn_test bntest.out: bn_test
44 ./bn_test -out bn_test.out
45
46REGRESS_TARGETS += run-bc
47.PHONY: run-bc
48run-bc: bn_test.out
49 bc < $> | tee bc.out | grep -v '^0$$'
50 ! grep -v '^test ' <bc.out | grep -v '^0$$'
51
52.for p in ${STATIC_LINK}
53LDADD_$p += ${CRYPTO_INT}
54.endfor
55
56.PHONY: isqrt-print-tables
19 57
20.include <bsd.regress.mk> 58.include <bsd.regress.mk>
diff --git a/src/regress/lib/libcrypto/bn/addsub/Makefile b/src/regress/lib/libcrypto/bn/addsub/Makefile
deleted file mode 100644
index 382e776716..0000000000
--- a/src/regress/lib/libcrypto/bn/addsub/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
1# $OpenBSD: Makefile,v 1.2 2022/06/19 17:08:19 tb Exp $
2
3.include "../../Makefile.inc"
4
5PROG= bnaddsub
6LDADD= ${LIBCRYPTO}
7DPADD= ${LIBCRYPTO}
8WARNINGS= Yes
9CFLAGS+= -Werror
10
11.include <bsd.regress.mk>
diff --git a/src/regress/lib/libcrypto/bn/addsub/bnaddsub.c b/src/regress/lib/libcrypto/bn/bn_add_sub.c
index e23821ed2b..f13129a000 100644
--- a/src/regress/lib/libcrypto/bn/addsub/bnaddsub.c
+++ b/src/regress/lib/libcrypto/bn/bn_add_sub.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bnaddsub.c,v 1.3 2018/07/23 17:15:21 tb Exp $ */ 1/* $OpenBSD: bn_add_sub.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/general/bn_isqrt.c b/src/regress/lib/libcrypto/bn/bn_isqrt.c
index b0ec80b939..a730322082 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_isqrt.c
+++ b/src/regress/lib/libcrypto/bn/bn_isqrt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_isqrt.c,v 1.9 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_isqrt.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/general/bn_mod_exp2_mont.c b/src/regress/lib/libcrypto/bn/bn_mod_exp2_mont.c
index f0ebfcbac1..0fa2b960df 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_mod_exp2_mont.c
+++ b/src/regress/lib/libcrypto/bn/bn_mod_exp2_mont.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mod_exp2_mont.c,v 1.2 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_mod_exp2_mont.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/general/bn_mod_sqrt.c b/src/regress/lib/libcrypto/bn/bn_mod_sqrt.c
index 71e27a36e1..e193755b74 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_mod_sqrt.c
+++ b/src/regress/lib/libcrypto/bn/bn_mod_sqrt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mod_sqrt.c,v 1.2 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_mod_sqrt.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/mont/mont.c b/src/regress/lib/libcrypto/bn/bn_mont.c
index 8b9b14a20e..d7c8f9581d 100644
--- a/src/regress/lib/libcrypto/bn/mont/mont.c
+++ b/src/regress/lib/libcrypto/bn/bn_mont.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mont.c,v 1.6 2022/01/14 09:32:27 tb Exp $ */ 1/* $OpenBSD: bn_mont.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Miodrag Vallat. 4 * Copyright (c) 2014 Miodrag Vallat.
diff --git a/src/regress/lib/libcrypto/bn/general/bn_primes.c b/src/regress/lib/libcrypto/bn/bn_primes.c
index e637932ccc..e9a91ba87a 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_primes.c
+++ b/src/regress/lib/libcrypto/bn/bn_primes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_primes.c,v 1.4 2022/12/01 14:32:06 tb Exp $ */ 1/* $OpenBSD: bn_primes.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/rand/bn_rand_interval.c b/src/regress/lib/libcrypto/bn/bn_rand_interval.c
index 8cd552734c..032edfb497 100644
--- a/src/regress/lib/libcrypto/bn/rand/bn_rand_interval.c
+++ b/src/regress/lib/libcrypto/bn/bn_rand_interval.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_rand_interval.c,v 1.6 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_rand_interval.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/general/bntest.c b/src/regress/lib/libcrypto/bn/bn_test.c
index b9581a0cd9..c1feddeda1 100644
--- a/src/regress/lib/libcrypto/bn/general/bntest.c
+++ b/src/regress/lib/libcrypto/bn/bn_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bntest.c,v 1.25 2022/09/05 21:06:31 tb Exp $ */ 1/* $OpenBSD: bn_test.c,v 1.1 2022/12/01 20:50:10 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 *
diff --git a/src/regress/lib/libcrypto/bn/general/bn_to_string.c b/src/regress/lib/libcrypto/bn/bn_to_string.c
index 901fa98610..ca5ca2f08d 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_to_string.c
+++ b/src/regress/lib/libcrypto/bn/bn_to_string.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_to_string.c,v 1.2 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_to_string.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org>
4 * 4 *
diff --git a/src/regress/lib/libcrypto/bn/general/bn_unit.c b/src/regress/lib/libcrypto/bn/bn_unit.c
index f2b3652f88..b4e4a776de 100644
--- a/src/regress/lib/libcrypto/bn/general/bn_unit.c
+++ b/src/regress/lib/libcrypto/bn/bn_unit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_unit.c,v 1.6 2022/12/01 13:49:12 tb Exp $ */ 1/* $OpenBSD: bn_unit.c,v 1.1 2022/12/01 20:50:10 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
diff --git a/src/regress/lib/libcrypto/bn/general/Makefile b/src/regress/lib/libcrypto/bn/general/Makefile
deleted file mode 100644
index 22f3e3f95f..0000000000
--- a/src/regress/lib/libcrypto/bn/general/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
1# $OpenBSD: Makefile,v 1.16 2022/11/22 08:56:33 tb Exp $
2
3.include "../../Makefile.inc"
4
5PROGS += bntest
6PROGS += bn_isqrt
7PROGS += bn_mod_exp2_mont
8PROGS += bn_mod_sqrt
9PROGS += bn_primes
10PROGS += bn_to_string
11PROGS += bn_unit
12
13DPADD += ${LIBCRYPTO}
14LDFLAGS += -lcrypto
15WARNINGS = Yes
16CFLAGS += -Werror
17CFLAGS += -I${.CURDIR}/../../../../../lib/libcrypto/bn/
18CLEANFILES = bntest.out bc.out
19
20LDADD_bntest = ${CRYPTO_INT}
21REGRESS_TARGETS += run-bntest
22run-bntest bntest.out: bntest
23 ./bntest -out bntest.out
24
25REGRESS_TARGETS += run-bc
26run-bc: bntest.out
27 bc < bntest.out | tee bc.out | grep -v '^0$$'
28 ! grep -v '^test ' <bc.out | grep -v '^0$$'
29
30REGRESS_TARGETS += run-bn_mod_exp2_mont
31run-bn_mod_exp2_mont: bn_mod_exp2_mont
32 ./bn_mod_exp2_mont
33
34REGRESS_TARGETS += run-bn_mod_sqrt
35run-bn_mod_sqrt: bn_mod_sqrt
36 ./bn_mod_sqrt
37
38LDADD_bn_primes = ${CRYPTO_INT}
39REGRESS_TARGETS += run-bn_primes
40run-bn_primes: bn_primes
41 ./bn_primes
42
43LDADD_bn_to_string = ${CRYPTO_INT}
44REGRESS_TARGETS += run-bn_to_string
45run-bn_to_string: bn_to_string
46 ./bn_to_string
47
48REGRESS_TARGETS += run-bn_unit
49run-bn_unit: bn_unit
50 ./bn_unit
51
52
53LDADD_bn_isqrt = ${CRYPTO_INT}
54REGRESS_TARGETS += run-bn_isqrt
55run-bn_isqrt: bn_isqrt
56 ./bn_isqrt
57
58print-tables: bn_isqrt
59 @./bn_isqrt -C
60
61.include <bsd.regress.mk>
diff --git a/src/regress/lib/libcrypto/bn/mont/Makefile b/src/regress/lib/libcrypto/bn/mont/Makefile
deleted file mode 100644
index 55c48220d4..0000000000
--- a/src/regress/lib/libcrypto/bn/mont/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
1# $OpenBSD: Makefile,v 1.3 2017/01/21 09:38:58 beck Exp $
2
3PROG= mont
4LDADD= -lcrypto
5DPADD= ${LIBCRYPTO}
6WARNINGS= Yes
7CFLAGS+= -Werror
8
9.include <bsd.regress.mk>
diff --git a/src/regress/lib/libcrypto/bn/rand/Makefile b/src/regress/lib/libcrypto/bn/rand/Makefile
deleted file mode 100644
index 52d0835df4..0000000000
--- a/src/regress/lib/libcrypto/bn/rand/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
1# $OpenBSD: Makefile,v 1.1 2018/11/06 06:55:27 tb Exp $
2
3.include "../../Makefile.inc"
4
5PROG= bn_rand_interval
6LDADD= ${CRYPTO_INT}
7DPADD= ${LIBCRYPTO}
8WARNINGS= Yes
9CFLAGS+= -Werror
10
11.include <bsd.regress.mk>