From 7e198ef2756edbb6d83001f2767b3f787e3df9b7 Mon Sep 17 00:00:00 2001 From: rin Date: Sat, 8 Jul 2023 23:54:27 +0000 Subject: Sprinkle OPENSSL_NO_EC_NISTP_64_GCC_128 for aarch64eb. Otherwise, the following tests fail with wrong results: - crypto/libcrypto/t_ciphers:evp - crypto/libcrypto/t_pubkey:ec Official document says ec_nistp_64_gcc_128 does not support big endian: https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-ec_nistp_64_gcc_128 Thanks @a_rin for pointing this out on Twitter! Note that an equivalent hack was present in openssl.old for aarch64eb, alpha, and sparc64. But: - alpha received upstream fix (PR lib/55701) - sparc64 has been fixed differently (PR port-sparc64/57472) --- crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc b/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc index 28e78dde9f9..26082ce9323 100644 --- a/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc +++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc @@ -2,4 +2,7 @@ ECCPPFLAGS+=-DECP_NISTZ256_ASM EC_SRCS += ecp_nistz256-armv8.S ECNI = yes +.if ${MACHINE_ARCH} == "aarch64eb" +ECCPPFLAGS+=-DOPENSSL_NO_EC_NISTP_64_GCC_128 +.endif .include "../../ec.inc" -- cgit