s390x: Fix build on s390x with 'disable-asm'
authorIngo Franzki <ifranzki@linux.ibm.com>
Fri, 2 Feb 2024 09:20:55 +0000 (10:20 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 6 Feb 2024 08:30:11 +0000 (09:30 +0100)
Do not define S390X_MOD_EXP for a NO_ASM build, this would result in
unresolved externals for s390x_mod_exp and s390x_crt.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23458)

include/crypto/bn.h

index 33f979ce91767f487144717ced5cfed829ddd0b4..48859683fef59ef8d535d4f69c48691898c5d4f6 100644 (file)
@@ -116,7 +116,8 @@ OSSL_LIB_CTX *ossl_bn_get_libctx(BN_CTX *ctx);
 
 extern const BIGNUM ossl_bn_inv_sqrt_2;
 
-#if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE) && defined (__s390x__)
+#if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE) && defined (__s390x__) \
+    && !defined (OPENSSL_NO_ASM)
 # define S390X_MOD_EXP
 #endif