Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64 Sprin...



details:   https://anonhg.NetBSD.org/src/rev/a2b2707676f5
branches:  trunk
changeset: 377364:a2b2707676f5
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Jul 08 23:54:27 2023 +0000

description:
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:

 crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 280afcea538a -r a2b2707676f5 crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc     Sat Jul 08 23:42:48 2023 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc     Sat Jul 08 23:54:27 2023 +0000
@@ -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"



Home | Main Index | Thread Index | Old Index