Add regress against OpenSSL 3.2
authortb <tb@openbsd.org>
Wed, 4 Sep 2024 04:34:14 +0000 (04:34 +0000)
committertb <tb@openbsd.org>
Wed, 4 Sep 2024 04:34:14 +0000 (04:34 +0000)
OpenSSL 1.1 is dead. This directory will use the default version in ports
(currently 3.2) for regress testing.

regress/usr.sbin/rpki-client/openssl/Makefile [new file with mode: 0644]
regress/usr.sbin/rpki-client/openssl/unistd.h [new file with mode: 0644]

diff --git a/regress/usr.sbin/rpki-client/openssl/Makefile b/regress/usr.sbin/rpki-client/openssl/Makefile
new file mode 100644 (file)
index 0000000..2d5ce4c
--- /dev/null
@@ -0,0 +1,10 @@
+# $OpenBSD: Makefile,v 1.1 2024/09/04 04:34:14 tb Exp $
+
+EOPENSSL =     eopenssl32
+
+LDADD +=       -Wl,-rpath,/usr/local/lib/${EOPENSSL} -L/usr/local/lib/${EOPENSSL}
+CFLAGS +=      -I${.CURDIR}/ -I/usr/local/include/${EOPENSSL}/
+
+.PATH:         ${.CURDIR}/..
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.sbin/rpki-client/openssl/unistd.h b/regress/usr.sbin/rpki-client/openssl/unistd.h
new file mode 100644 (file)
index 0000000..9aa4024
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Public domain
+ * compatibility shim for OpenSSL 3
+ * overloading unistd.h is a ugly guly hack for this issue but works here
+ */
+
+#include_next <unistd.h>
+
+#include <openssl/cms.h>
+#include <openssl/stack.h>
+
+#ifndef DECLARE_STACK_OF
+#define DECLARE_STACK_OF DEFINE_STACK_OF
+#endif
+
+static inline int
+CMS_get_version(CMS_ContentInfo *cms, long *version)
+{
+       *version = 3;
+       return 1;
+}
+
+static inline int
+CMS_SignerInfo_get_version(CMS_SignerInfo *si, long *version)
+{
+       *version = 3;
+       return 1;
+}