From: Gerd Hoffmann Date: Mon, 9 Sep 2024 15:09:34 +0000 (+0200) Subject: fix small footprint builds on arm X-Git-Tag: openssl-3.1.8~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=578d1d1609f956e821b0e95ad6bf7e56d4337b8e;p=thirdparty%2Fopenssl.git fix small footprint builds on arm Building with '-D OPENSSL_SMALL_FOOTPRINT' for aarch64 fails due to 'gcm_ghash_4bit' being undeclared. Fix that by not setting the function pointer when building with OPENSSL_SMALL_FOOTPRINT, matching openssl behavior on x86. Signed-off-by: Gerd Hoffmann Reviewed-by: Tomas Mraz Reviewed-by: Tim Hudson Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/25419) (cherry picked from commit 2a53df6947e195ac08bc04c9d2fec1fed977668f) --- diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c index 39994eeb95d..1ad8c7a2272 100644 --- a/crypto/modes/gcm128.c +++ b/crypto/modes/gcm128.c @@ -462,7 +462,11 @@ static void gcm_get_funcs(struct gcm_funcs_st *ctx) #elif defined(GHASH_ASM_ARM) /* ARM defaults */ ctx->gmult = gcm_gmult_4bit; +# if !defined(OPENSSL_SMALL_FOOTPRINT) ctx->ghash = gcm_ghash_4bit; +# else + ctx->ghash = NULL; +# endif # ifdef PMULL_CAPABLE if (PMULL_CAPABLE) { ctx->ginit = (gcm_init_fn)gcm_init_v8;