diff options
| author | tb <> | 2023-04-17 19:51:05 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-17 19:51:05 +0000 |
| commit | dd7ef5947fb6914a15d9ef5a7f38f268804c9eb0 (patch) | |
| tree | 78ef1be4678519c1ff8b8cbb03c3c03eee265a5d /src | |
| parent | 6793f04b1b074a11f5e000aba0216cbe684de0d6 (diff) | |
| download | openbsd-dd7ef5947fb6914a15d9ef5a7f38f268804c9eb0.tar.gz openbsd-dd7ef5947fb6914a15d9ef5a7f38f268804c9eb0.tar.bz2 openbsd-dd7ef5947fb6914a15d9ef5a7f38f268804c9eb0.zip | |
Allow overriding the bc implementation used in run-bc
While base bc is great, it uses libcrypto's BIGNUM implementation.
This implies that the independent verification of the bn_test isn't
as independent as it should be.
With this commit, run-bc picks up bn-gh if it is installed. This appears
to work on amd64, arm64 and sparc64 (where gbc is busted). I will send
PRs to the regress maintainers once I will have tested this a bit more
thoroughly. Committing this early since I juggle way too many diffs
already.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/bn/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/bn/Makefile b/src/regress/lib/libcrypto/bn/Makefile index 2ba1d396dd..9d9d77ae2d 100644 --- a/src/regress/lib/libcrypto/bn/Makefile +++ b/src/regress/lib/libcrypto/bn/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.30 2023/04/17 19:37:18 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.31 2023/04/17 19:51:05 tb Exp $ |
| 2 | 2 | ||
| 3 | PROGS += bn_add_sub | 3 | PROGS += bn_add_sub |
| 4 | PROGS += bn_cmp | 4 | PROGS += bn_cmp |
| @@ -53,10 +53,15 @@ CLEANFILES += bn_isqrt_gen_tables.txt.tmp bn_isqrt_gen_tables.txt | |||
| 53 | run-regress-bn_test bn_test.out: bn_test | 53 | run-regress-bn_test bn_test.out: bn_test |
| 54 | ./bn_test -out bn_test.out | 54 | ./bn_test -out bn_test.out |
| 55 | 55 | ||
| 56 | .if exists(/usr/local/bin/bc-gh) | ||
| 57 | BC ?= bc-gh | ||
| 58 | .endif | ||
| 59 | BC ?= bc | ||
| 60 | |||
| 56 | REGRESS_TARGETS += run-bc | 61 | REGRESS_TARGETS += run-bc |
| 57 | .PHONY: run-bc | 62 | .PHONY: run-bc |
| 58 | run-bc: bn_test.out | 63 | run-bc: bn_test.out |
| 59 | bc < $> | tee bc.out | grep -v '^0$$' | 64 | ${BC} < $> | tee bc.out | grep -v '^0$$' |
| 60 | ! grep -v '^test ' <bc.out | grep -v '^0$$' | 65 | ! grep -v '^test ' <bc.out | grep -v '^0$$' |
| 61 | 66 | ||
| 62 | CLEANFILES += bn_test.out bc.out | 67 | CLEANFILES += bn_test.out bc.out |
