From 03fc8f9b9ecbb65326348dd8eccc5d22344abefe Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 17 Jan 2026 16:18:32 +0000 Subject: Provide LIBRESSL_USE_.*_ASSEMBLY defines. Make life easier for portable by providing LIBRESSL_USE_.*_ASSEMBLY defines, which enable/disable assembly for a specific algorithm. This means that selected platforms can include the assembly files and specify a define, rather than having to try to patch the crypto_arch.h headers. Discussed with tb@ --- src/lib/libcrypto/arch/aarch64/Makefile.inc | 3 ++- src/lib/libcrypto/arch/aarch64/crypto_arch.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/arch/aarch64') diff --git a/src/lib/libcrypto/arch/aarch64/Makefile.inc b/src/lib/libcrypto/arch/aarch64/Makefile.inc index d1f22d87cd..596e98fe69 100644 --- a/src/lib/libcrypto/arch/aarch64/Makefile.inc +++ b/src/lib/libcrypto/arch/aarch64/Makefile.inc @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile.inc,v 1.17 2025/06/28 12:51:08 jsing Exp $ +# $OpenBSD: Makefile.inc,v 1.18 2026/01/17 16:18:31 jsing Exp $ # aarch64-specific libcrypto build rules SRCS += crypto_cpu_caps.c +CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY SRCS += sha1_aarch64.c SRCS += sha1_aarch64_ce.S SRCS += sha256_aarch64.c diff --git a/src/lib/libcrypto/arch/aarch64/crypto_arch.h b/src/lib/libcrypto/arch/aarch64/crypto_arch.h index 51c8d79e2d..8b5d83311e 100644 --- a/src/lib/libcrypto/arch/aarch64/crypto_arch.h +++ b/src/lib/libcrypto/arch/aarch64/crypto_arch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_arch.h,v 1.5 2025/06/28 12:51:08 jsing Exp $ */ +/* $OpenBSD: crypto_arch.h,v 1.6 2026/01/17 16:18:31 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -35,9 +35,11 @@ extern uint64_t crypto_cpu_caps_aarch64; #ifndef OPENSSL_NO_ASM +#ifdef LIBRESSL_USE_SHA_ASSEMBLY #define HAVE_SHA1_BLOCK_DATA_ORDER #define HAVE_SHA256_BLOCK_DATA_ORDER #define HAVE_SHA512_BLOCK_DATA_ORDER +#endif #endif -- cgit v1.2.3-55-g6feb