From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Subject: [PATCH master] scripts: make build compatible with OpenSSL v4.0
Date: Mon, 24 Aug 2026 14:21:06 +0200 [thread overview]
Message-ID: <20260824122137.3561601-1-a.fatoum@pengutronix.de> (raw)
In addition to normal key files, rkimage supports resolving
pkcs11 URIs via both OpenSSL providers and engines.
keytoc only supports engines in addition to keyfiles.
OpenSSL v4.0 removes engine support failing the build of these two host
tools[1]. Define OPENSSL_ENGINE_STUBS[2], so the engine functions return
errors and the fallback path, if available, is taken instead.
Normal key file usage remains unaffected.
[1]: https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/8469870/rawk
[2]: https://openssl-library.org/post/2025-12-18-remove-engines/
Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/keytoc.c | 3 +++
scripts/rkimage.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/scripts/keytoc.c b/scripts/keytoc.c
index e78d01048107..664753ecbbe2 100644
--- a/scripts/keytoc.c
+++ b/scripts/keytoc.c
@@ -10,6 +10,9 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" /* ENGINE deprecated in OpenSSL 3.0 */
+/* OpenSSL 4.0 removed the ENGINE symbols; ask for the no-op stubs instead */
+#define OPENSSL_ENGINE_STUBS
+
#include "include/string_util.h"
#include <stdio.h>
diff --git a/scripts/rkimage.c b/scripts/rkimage.c
index 8243742d659f..268ce56c1728 100644
--- a/scripts/rkimage.c
+++ b/scripts/rkimage.c
@@ -1,4 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
+
+/* OpenSSL 4.0 removed the ENGINE symbols; ask for the no-op stubs instead */
+#define OPENSSL_ENGINE_STUBS
+
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
--
2.47.3
next reply other threads:[~2026-08-24 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 12:21 Ahmad Fatoum [this message]
2026-08-24 13:00 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260824122137.3561601-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jaipaul.cheernam@est.tech \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox