-# $OpenBSD: Makefile,v 1.3 2022/06/15 06:14:59 tb Exp $
+# $OpenBSD: Makefile,v 1.4 2023/04/14 12:41:26 tb Exp $
PROG= signertest
LDADD= -lcrypto -lssl ${TLS_INT}
WARNINGS= Yes
CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror
CFLAGS+= -I${.CURDIR}/../../../../lib/libtls/
-
-REGRESS_TARGETS= \
- regress-signertest
-
-regress-signertest: ${PROG}
- ./signertest \
- ${.CURDIR}/../../libssl/certs
+CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../../libssl/certs\"
.include <bsd.regress.mk>
-/* $OpenBSD: signertest.c,v 1.5 2022/03/24 15:58:57 tb Exp $ */
+/* $OpenBSD: signertest.c,v 1.6 2023/04/14 12:41:26 tb Exp $ */
/*
* Copyright (c) 2017, 2018, 2022 Joel Sing <jsing@openbsd.org>
*
#include "tls_internal.h"
-const char *cert_path;
+#ifndef CERTSDIR
+#define CERTSDIR "."
+#endif
+
+const char *cert_path = CERTSDIR;
int sign_cb_count;
static void
{
int failure = 0;
- if (argc != 2) {
- fprintf(stderr, "usage: %s certpath\n", argv[0]);
+ if (argc > 2) {
+ fprintf(stderr, "usage: %s [certpath]\n", argv[0]);
return (1);
}
-
- cert_path = argv[1];
+ if (argc == 2)
+ cert_path = argv[1];
failure |= do_signer_tests();
failure |= do_signer_tls_tests();