From 1c81b147a962bb9ce33de4e070e855faab92489d Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 2 Dec 2025 12:37:54 +0100 Subject: [PATCH] Use better description of macros purpose in engine.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Resolves: https://github.com/openssl/project/issues/1735 Signed-off-by: Milan Broz Reviewed-by: Eugene Syromiatnikov Reviewed-by: Saša Nedvědický Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman Reviewed-by: Matt Caswell Reviewed-by: Norbert Pocs (Merged from https://github.com/openssl/openssl/pull/29305) --- include/openssl/engine.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/openssl/engine.h b/include/openssl/engine.h index 63a4e6b0cbb..a544f39aa05 100644 --- a/include/openssl/engine.h +++ b/include/openssl/engine.h @@ -20,14 +20,19 @@ # include /* - * There is no OPENSSL_NO_NO_ENGINE, Engines are permanently disabled - * and OPENSSL_NO_ENGINE must be defined + * Engine support is gone. Definitions here are provided for the source code + * compatibility only. They are meant to keep compilation working for legacy + * projects that, for whatever reason, cannot remove/disable old legacy code. * - * This header now generates compatible definitions according - * to OPENSSL_ENGINE_STUBS define. - * Note we have to use compile-time message to warn only if API is really used. - * To avoid complicated macros we kind-of abuse existing OSSL_DEPRACATED macros. + * We deliberately keep the OPENSSL_NO_ENGINE macro around as it is supplied + * when the build is configured with the `no-engine` option. OpenSSL 4.0 keeps + * the `no-engine` option around. + * + * Note, we have to use a compile-time message to warn only if the API is really + * used. To avoid complex macros, we kind of abuse the existing OSSL_DEPRECATED + * macros. */ + # ifdef OPENSSL_ENGINE_STUBS # define ENGINE_INFO_MSG \ " API symbol is replaced with stub to avoid linker error." -- 2.47.3