From 0309184849508ff610a42af41079ce07b401fbcd Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 22 Sep 2026 18:09:32 -0500 Subject: [PATCH] wolfssl/wolfcrypt/wc_compat.h and linuxkm/module_exports.c.template: recognize WC_NO_COMPAT_H_REMAPS, and use it to inhibit false kernel symbol exports. --- linuxkm/module_exports.c.template | 2 ++ wolfssl/wolfcrypt/wc_compat.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/linuxkm/module_exports.c.template b/linuxkm/module_exports.c.template index f3583184ed..3d15a50af2 100644 --- a/linuxkm/module_exports.c.template +++ b/linuxkm/module_exports.c.template @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#define WC_NO_COMPAT_H_REMAPS + #include #ifdef HAVE_FIPS diff --git a/wolfssl/wolfcrypt/wc_compat.h b/wolfssl/wolfcrypt/wc_compat.h index 1a82433b2b..2bfa5de687 100644 --- a/wolfssl/wolfcrypt/wc_compat.h +++ b/wolfssl/wolfcrypt/wc_compat.h @@ -23,7 +23,8 @@ \brief Header file containing wolfCrypt compatibility shims */ -#if (defined(WOLF_CRYPT_SHA256_H) && !defined(NO_SHA256) && \ +#if defined(WC_NO_COMPAT_H_REMAPS) || \ + (defined(WOLF_CRYPT_SHA256_H) && !defined(NO_SHA256) && \ !defined(WC_SHA256_TYPE_DEFINED) && !defined(SHA256_NOINLINE)) || \ (defined(WOLF_CRYPT_SHA512_H) && \ (defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)) && \