From 43a6b7cb41659f6d4cf49620f1d154ce156d8ffa Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 4 Sep 2024 04:34:14 +0000 Subject: [PATCH] Add regress against OpenSSL 3.2 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 | 10 +++++++ regress/usr.sbin/rpki-client/openssl/unistd.h | 28 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 regress/usr.sbin/rpki-client/openssl/Makefile create mode 100644 regress/usr.sbin/rpki-client/openssl/unistd.h diff --git a/regress/usr.sbin/rpki-client/openssl/Makefile b/regress/usr.sbin/rpki-client/openssl/Makefile new file mode 100644 index 00000000000..2d5ce4cd64b --- /dev/null +++ b/regress/usr.sbin/rpki-client/openssl/Makefile @@ -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 diff --git a/regress/usr.sbin/rpki-client/openssl/unistd.h b/regress/usr.sbin/rpki-client/openssl/unistd.h new file mode 100644 index 00000000000..9aa40242b1f --- /dev/null +++ b/regress/usr.sbin/rpki-client/openssl/unistd.h @@ -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 + +#include +#include + +#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; +} -- 2.20.1