summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arch/hppa
diff options
context:
space:
mode:
authorjsing <>2025-02-14 12:01:58 +0000
committerjsing <>2025-02-14 12:01:58 +0000
commita89810379a758c9cd27af2462547dc646dcfaa61 (patch)
tree606af9a8caef4eada19e055b0a35e755d199b0d1 /src/lib/libcrypto/arch/hppa
parent6e0324f52f75f22301a0c9bbe6f53feb5b6a8628 (diff)
downloadopenbsd-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/hppa')
-rw-r--r--src/lib/libcrypto/arch/hppa/Makefile.inc4
-rw-r--r--src/lib/libcrypto/arch/hppa/crypto_arch.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/arch/hppa/Makefile.inc
index 4e2675a600..11bfa4a5d3 100644
--- a/src/lib/libcrypto/arch/hppa/Makefile.inc
+++ b/src/lib/libcrypto/arch/hppa/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.25 2024/08/11 13:02:39 jsing Exp $ 1# $OpenBSD: Makefile.inc,v 1.26 2025/02/14 12:01:58 jsing Exp $
2 2
3# hppa-specific libcrypto build rules 3# hppa-specific libcrypto build rules
4 4
@@ -12,9 +12,7 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT -DBN_DIV2W
12CFLAGS+= -DGHASH_ASM 12CFLAGS+= -DGHASH_ASM
13SSLASM+= modes ghash-parisc ghash-parisc 13SSLASM+= modes ghash-parisc ghash-parisc
14# sha 14# sha
15CFLAGS+= -DSHA1_ASM
16SSLASM+= sha sha1-parisc sha1-parisc 15SSLASM+= sha sha1-parisc sha1-parisc
17CFLAGS+= -DSHA256_ASM
18SSLASM+= sha sha512-parisc sha256-parisc 16SSLASM+= sha sha512-parisc sha256-parisc
19 17
20.for dir src dst in ${SSLASM} 18.for dir src dst in ${SSLASM}
diff --git a/src/lib/libcrypto/arch/hppa/crypto_arch.h b/src/lib/libcrypto/arch/hppa/crypto_arch.h
index 7f1fc36cac..08fcaca045 100644
--- a/src/lib/libcrypto/arch/hppa/crypto_arch.h
+++ b/src/lib/libcrypto/arch/hppa/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 *
@@ -23,6 +23,12 @@
23#define HAVE_AES_ENCRYPT_INTERNAL 23#define HAVE_AES_ENCRYPT_INTERNAL
24#define HAVE_AES_DECRYPT_INTERNAL 24#define HAVE_AES_DECRYPT_INTERNAL
25 25
26#define HAVE_SHA1_BLOCK_DATA_ORDER
27#define HAVE_SHA1_BLOCK_GENERIC
28
29#define HAVE_SHA256_BLOCK_DATA_ORDER
30#define HAVE_SHA256_BLOCK_GENERIC
31
26#endif 32#endif
27 33
28#endif 34#endif