Module Name:    src
Committed By:   rin
Date:           Sat Jul  8 23:54:27 UTC 2023

Modified Files:
        src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: ec.inc

Log Message:
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)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc:1.3	Wed May 17 19:09:41 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc	Sat Jul  8 23:54:27 2023
@@ -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"

Reply via email to