Cherry-pick four upstream commits that prevent building of otp_test_engine when LibreSSL-3.5.0 is used. Since OpenWrt bumped LibreSSL to 3.5.3 the erlang host builds fail to complete. CC ../priv/obj/x86_64-pc-linux-gnu/otp_test_engine.o otp_test_engine.c: In function 'test_engine_md5_init': otp_test_engine.c:144:34: error: dereferencing pointer to incomplete type 'EVP_MD_CTX' {aka 'struct env_md_ctx_st'} #define data(ctx) ((MD5_CTX *)ctx->md_data) ^~ Also switch to AUTORELEASE. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 4e3d154c0f1bd975016eaa2d842affd230b736cc Mon Sep 17 00:00:00 2001
|
|
From: Hans Nilsson <hans@erlang.org>
|
|
Date: Mon, 21 Feb 2022 14:58:08 +0100
|
|
Subject: [PATCH] crypto: do --disable-otp-test-engine for LibreSSL >= 3.5.0
|
|
|
|
---
|
|
lib/crypto/configure.in | 17 +++++++++++++++--
|
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
|
--- a/lib/crypto/configure.in
|
|
+++ b/lib/crypto/configure.in
|
|
@@ -159,11 +159,11 @@ AS_HELP_STRING([--disable-evp-hmac],
|
|
|
|
AC_ARG_ENABLE(otp-test-engine,
|
|
AS_HELP_STRING([--disable-otp-test-engine],
|
|
- [intentionally undocumented workaround]),
|
|
+ [Disable build of the otp_test_engine. (default is --enable-otp-test-engine, unless for LibreSSL >= 3.5.0 where default is --disable-otp-test-engine)]),
|
|
[ case "$enableval" in
|
|
no) DISABLE_OTP_TEST_ENGINE=yes;;
|
|
*) DISABLE_OTP_TEST_ENGINE=no;;
|
|
- esac ], DISABLE_OTP_TEST_ENGINE=no)
|
|
+ esac ], DISABLE_OTP_TEST_ENGINE=default)
|
|
|
|
AC_ARG_ENABLE(deprecated_warnings,
|
|
AS_HELP_STRING([--disable-deprecated-warnings],
|
|
@@ -245,6 +245,19 @@ yes
|
|
],
|
|
[v3_include=yes],
|
|
[v3_include=no])
|
|
+
|
|
+if test "x$DISABLE_OTP_TEST_ENGINE" = "xdefault"; then
|
|
+# Get default value for the --disable-otp-test-engine. Depends on cryptolib version
|
|
+ AC_EGREP_CPP(^yes.?$,[
|
|
+#include <openssl/opensslv.h>
|
|
+#if LIBRESSL_VERSION_NUMBER >= 0x3050000fL
|
|
+yes
|
|
+#endif
|
|
+ ],
|
|
+ [DISABLE_OTP_TEST_ENGINE=yes],
|
|
+ [DISABLE_OTP_TEST_ENGINE=no])
|
|
+ fi
|
|
+
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
if test $valid_include != yes; then
|