diff options
author | tb <> | 2023-04-14 12:41:26 +0000 |
---|---|---|
committer | tb <> | 2023-04-14 12:41:26 +0000 |
commit | c556567750bcea59402276e8f89a5f39b5e97103 (patch) | |
tree | 8b43ecf518f3ed12f399896722907cb6a713e665 | |
parent | 5264a960a8d814a5b4d0ae2da392a87900170249 (diff) | |
download | openbsd-c556567750bcea59402276e8f89a5f39b5e97103.tar.gz openbsd-c556567750bcea59402276e8f89a5f39b5e97103.tar.bz2 openbsd-c556567750bcea59402276e8f89a5f39b5e97103.zip |
Make the signertest work better with the portable test framework
-rw-r--r-- | src/regress/lib/libtls/signer/Makefile | 10 | ||||
-rw-r--r-- | src/regress/lib/libtls/signer/signertest.c | 16 |
2 files changed, 12 insertions, 14 deletions
diff --git a/src/regress/lib/libtls/signer/Makefile b/src/regress/lib/libtls/signer/Makefile index 7110e9ff5e..ac72edffe9 100644 --- a/src/regress/lib/libtls/signer/Makefile +++ b/src/regress/lib/libtls/signer/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.3 2022/06/15 06:14:59 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.4 2023/04/14 12:41:26 tb Exp $ |
2 | 2 | ||
3 | PROG= signertest | 3 | PROG= signertest |
4 | LDADD= -lcrypto -lssl ${TLS_INT} | 4 | LDADD= -lcrypto -lssl ${TLS_INT} |
@@ -7,12 +7,6 @@ DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBTLS} | |||
7 | WARNINGS= Yes | 7 | WARNINGS= Yes |
8 | CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror | 8 | CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror |
9 | CFLAGS+= -I${.CURDIR}/../../../../lib/libtls/ | 9 | CFLAGS+= -I${.CURDIR}/../../../../lib/libtls/ |
10 | 10 | CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../../libssl/certs\" | |
11 | REGRESS_TARGETS= \ | ||
12 | regress-signertest | ||
13 | |||
14 | regress-signertest: ${PROG} | ||
15 | ./signertest \ | ||
16 | ${.CURDIR}/../../libssl/certs | ||
17 | 11 | ||
18 | .include <bsd.regress.mk> | 12 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libtls/signer/signertest.c b/src/regress/lib/libtls/signer/signertest.c index 89af257372..f0523d34b4 100644 --- a/src/regress/lib/libtls/signer/signertest.c +++ b/src/regress/lib/libtls/signer/signertest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: signertest.c,v 1.5 2022/03/24 15:58:57 tb Exp $ */ | 1 | /* $OpenBSD: signertest.c,v 1.6 2023/04/14 12:41:26 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017, 2018, 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017, 2018, 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -34,7 +34,11 @@ | |||
34 | 34 | ||
35 | #include "tls_internal.h" | 35 | #include "tls_internal.h" |
36 | 36 | ||
37 | const char *cert_path; | 37 | #ifndef CERTSDIR |
38 | #define CERTSDIR "." | ||
39 | #endif | ||
40 | |||
41 | const char *cert_path = CERTSDIR; | ||
38 | int sign_cb_count; | 42 | int sign_cb_count; |
39 | 43 | ||
40 | static void | 44 | static void |
@@ -453,12 +457,12 @@ main(int argc, char **argv) | |||
453 | { | 457 | { |
454 | int failure = 0; | 458 | int failure = 0; |
455 | 459 | ||
456 | if (argc != 2) { | 460 | if (argc > 2) { |
457 | fprintf(stderr, "usage: %s certpath\n", argv[0]); | 461 | fprintf(stderr, "usage: %s [certpath]\n", argv[0]); |
458 | return (1); | 462 | return (1); |
459 | } | 463 | } |
460 | 464 | if (argc == 2) | |
461 | cert_path = argv[1]; | 465 | cert_path = argv[1]; |
462 | 466 | ||
463 | failure |= do_signer_tests(); | 467 | failure |= do_signer_tests(); |
464 | failure |= do_signer_tls_tests(); | 468 | failure |= do_signer_tls_tests(); |