Adjust the signer test to link statically and work with hidden tls_signer
authortb <tb@openbsd.org>
Thu, 24 Mar 2022 15:58:57 +0000 (15:58 +0000)
committertb <tb@openbsd.org>
Thu, 24 Mar 2022 15:58:57 +0000 (15:58 +0000)
API.

regress/lib/libtls/signer/Makefile
regress/lib/libtls/signer/signertest.c

index b261417..d87f903 100644 (file)
@@ -1,11 +1,13 @@
-#      $OpenBSD: Makefile,v 1.1 2022/01/30 18:38:41 jsing Exp $
+#      $OpenBSD: Makefile,v 1.2 2022/03/24 15:58:57 tb Exp $
 
 PROG=  signertest
-LDADD= -lcrypto -lssl -ltls
+LDADD= -lcrypto -lssl
+LDADD+=        -Wl,-Bstatic -ltls -Wl,-Bdynamic
 DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBTLS}
 
 WARNINGS=      Yes
 CFLAGS+=       -DLIBRESSL_INTERNAL -Wall -Wundef -Werror
+CFLAGS+=       -I${.CURDIR}/../../../../lib/libtls/
 
 REGRESS_TARGETS= \
        regress-signertest
index 50ee5f0..89af257 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: signertest.c,v 1.4 2022/02/01 17:19:16 jsing Exp $ */
+/* $OpenBSD: signertest.c,v 1.5 2022/03/24 15:58:57 tb Exp $ */
 /*
  * Copyright (c) 2017, 2018, 2022 Joel Sing <jsing@openbsd.org>
  *
@@ -32,6 +32,8 @@
 
 #include <tls.h>
 
+#include "tls_internal.h"
+
 const char *cert_path;
 int sign_cb_count;