diff options
| author | jsing <> | 2026-01-17 16:18:32 +0000 |
|---|---|---|
| committer | jsing <> | 2026-01-17 16:18:32 +0000 |
| commit | 03fc8f9b9ecbb65326348dd8eccc5d22344abefe (patch) | |
| tree | 304533a0e18e53486c5458ff9c69099a939484be /src/lib/libcrypto/arch/aarch64 | |
| parent | fdea186c25361674646de3b0a16b3ad37c8f0ec3 (diff) | |
| download | openbsd-03fc8f9b9ecbb65326348dd8eccc5d22344abefe.tar.gz openbsd-03fc8f9b9ecbb65326348dd8eccc5d22344abefe.tar.bz2 openbsd-03fc8f9b9ecbb65326348dd8eccc5d22344abefe.zip | |
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@
Diffstat (limited to 'src/lib/libcrypto/arch/aarch64')
| -rw-r--r-- | src/lib/libcrypto/arch/aarch64/Makefile.inc | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/arch/aarch64/crypto_arch.h | 4 |
2 files changed, 5 insertions, 2 deletions
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 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.17 2025/06/28 12:51:08 jsing Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.18 2026/01/17 16:18:31 jsing Exp $ |
| 2 | 2 | ||
| 3 | # aarch64-specific libcrypto build rules | 3 | # aarch64-specific libcrypto build rules |
| 4 | 4 | ||
| 5 | SRCS += crypto_cpu_caps.c | 5 | SRCS += crypto_cpu_caps.c |
| 6 | 6 | ||
| 7 | CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY | ||
| 7 | SRCS += sha1_aarch64.c | 8 | SRCS += sha1_aarch64.c |
| 8 | SRCS += sha1_aarch64_ce.S | 9 | SRCS += sha1_aarch64_ce.S |
| 9 | SRCS += sha256_aarch64.c | 10 | 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 @@ | |||
| 1 | /* $OpenBSD: crypto_arch.h,v 1.5 2025/06/28 12:51:08 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.6 2026/01/17 16:18:31 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -35,9 +35,11 @@ extern uint64_t crypto_cpu_caps_aarch64; | |||
| 35 | 35 | ||
| 36 | #ifndef OPENSSL_NO_ASM | 36 | #ifndef OPENSSL_NO_ASM |
| 37 | 37 | ||
| 38 | #ifdef LIBRESSL_USE_SHA_ASSEMBLY | ||
| 38 | #define HAVE_SHA1_BLOCK_DATA_ORDER | 39 | #define HAVE_SHA1_BLOCK_DATA_ORDER |
| 39 | #define HAVE_SHA256_BLOCK_DATA_ORDER | 40 | #define HAVE_SHA256_BLOCK_DATA_ORDER |
| 40 | #define HAVE_SHA512_BLOCK_DATA_ORDER | 41 | #define HAVE_SHA512_BLOCK_DATA_ORDER |
| 42 | #endif | ||
| 41 | 43 | ||
| 42 | #endif | 44 | #endif |
| 43 | 45 | ||
