summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbarracuda156 <vital.had@gmail.com>2024-01-10 06:35:33 +0800
committerTomas Mraz <tomas@openssl.org>2024-01-12 19:33:33 +0100
commitdf04e81794ac3083804c34c173eb2b2fa55d373d (patch)
tree2d336734f86d34195a7c7d92b11b0d30cb024173
parentd8184e982c65eee674d045da827c253c30fb59ff (diff)
aes_platform.h, gcm128.c: fix Darwin PowerPC macro to include ppc64
Current PowerPC-related defines omit Darwin ppc64 case. Use __POWERPC__ in place of __ppc__ + __ppc64__ Fixes #23220 CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23245)
-rw-r--r--crypto/modes/gcm128.c2
-rw-r--r--include/crypto/aes_platform.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 6f293ef794..de9137c927 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -393,7 +393,7 @@ void gcm_init_vis3(u128 Htable[16], const u64 Xi[2]);
void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
-# elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
+# elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__POWERPC__) || defined(_ARCH_PPC))
# include "crypto/ppc_arch.h"
# define GHASH_ASM_PPC
void gcm_init_p8(u128 Htable[16], const u64 Xi[2]);
diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h
index 51fc5ba211..cf4a94b86e 100644
--- a/include/crypto/aes_platform.h
+++ b/include/crypto/aes_platform.h
@@ -60,7 +60,7 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len,
# endif /* AES_XTS_ASM */
# if defined(OPENSSL_CPUID_OBJ)
-# if (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
+# if (defined(__powerpc__) || defined(__POWERPC__) || defined(_ARCH_PPC))
# include "crypto/ppc_arch.h"
# ifdef VPAES_ASM
# define VPAES_CAPABLE (OPENSSL_ppccap_P & PPC_ALTIVEC)