diff options
| author | jsing <> | 2025-02-14 12:01:58 +0000 |
|---|---|---|
| committer | jsing <> | 2025-02-14 12:01:58 +0000 |
| commit | a89810379a758c9cd27af2462547dc646dcfaa61 (patch) | |
| tree | 606af9a8caef4eada19e055b0a35e755d199b0d1 /src/lib/libcrypto/arch/alpha | |
| parent | 6e0324f52f75f22301a0c9bbe6f53feb5b6a8628 (diff) | |
| download | openbsd-a89810379a758c9cd27af2462547dc646dcfaa61.tar.gz openbsd-a89810379a758c9cd27af2462547dc646dcfaa61.tar.bz2 openbsd-a89810379a758c9cd27af2462547dc646dcfaa61.zip | |
Replace Makefile based SHA*_ASM defines with HAVE_SHA_* defines.
Currently, SHA{1,256,512}_ASM defines are used to remove the C
implementation of sha{1,256,512}_block_data_order() when it is provided
by assembly. However, this prevents the C implementation from being used
as a fallback.
Rename the C sha*_block_data_order() to sha*_block_generic() and provide
a sha*_block_data_order() that calls sha*_block_generic(). Replace the
Makefile based SHA*_ASM defines with two HAVE_SHA_* defines that allow
these functions to be compiled in or removed, such that machine specific
verisons can be provided. This should effectively be a no-op on any
platform that defined SHA{1,256,512}_ASM.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/arch/alpha')
| -rw-r--r-- | src/lib/libcrypto/arch/alpha/Makefile.inc | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/arch/alpha/crypto_arch.h | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/arch/alpha/Makefile.inc b/src/lib/libcrypto/arch/alpha/Makefile.inc index 3e42c42f5e..1073ac3c1e 100644 --- a/src/lib/libcrypto/arch/alpha/Makefile.inc +++ b/src/lib/libcrypto/arch/alpha/Makefile.inc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.14 2024/03/29 07:24:09 jsing Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.15 2025/02/14 12:01:58 jsing Exp $ |
| 2 | 2 | ||
| 3 | # alpha-specific libcrypto build rules | 3 | # alpha-specific libcrypto build rules |
| 4 | 4 | ||
| @@ -9,7 +9,6 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT | |||
| 9 | CFLAGS+= -DGHASH_ASM | 9 | CFLAGS+= -DGHASH_ASM |
| 10 | SSLASM+= modes ghash-alpha | 10 | SSLASM+= modes ghash-alpha |
| 11 | # sha | 11 | # sha |
| 12 | CFLAGS+= -DSHA1_ASM | ||
| 13 | SSLASM+= sha sha1-alpha | 12 | SSLASM+= sha sha1-alpha |
| 14 | 13 | ||
| 15 | .for dir f in ${SSLASM} | 14 | .for dir f in ${SSLASM} |
diff --git a/src/lib/libcrypto/arch/alpha/crypto_arch.h b/src/lib/libcrypto/arch/alpha/crypto_arch.h index a3dd98d0ce..1d553b7e07 100644 --- a/src/lib/libcrypto/arch/alpha/crypto_arch.h +++ b/src/lib/libcrypto/arch/alpha/crypto_arch.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_arch.h,v 1.1 2024/08/11 13:02:39 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.2 2025/02/14 12:01:58 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -18,4 +18,7 @@ | |||
| 18 | #ifndef HEADER_CRYPTO_ARCH_H | 18 | #ifndef HEADER_CRYPTO_ARCH_H |
| 19 | #define HEADER_CRYPTO_ARCH_H | 19 | #define HEADER_CRYPTO_ARCH_H |
| 20 | 20 | ||
| 21 | #define HAVE_SHA1_BLOCK_DATA_ORDER | ||
| 22 | #define HAVE_SHA1_BLOCK_GENERIC | ||
| 23 | |||
| 21 | #endif | 24 | #endif |
