summaryrefslogtreecommitdiff
path: root/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2023-07-08 23:54:27 +0000
committerrin <rin@NetBSD.org>2023-07-08 23:54:27 +0000
commit7e198ef2756edbb6d83001f2767b3f787e3df9b7 (patch)
treedeea3ddd63ec5e10f51bb45025001a9888a038ed /crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc
parent72291f498126dbbeb97f9e83bb05c6b14ddb522d (diff)
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)
Diffstat (limited to 'crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc')
-rw-r--r--crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc3
1 files changed, 3 insertions, 0 deletions
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"