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/hppa | |
| 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/hppa')
| -rw-r--r-- | src/lib/libcrypto/arch/hppa/Makefile.inc | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/arch/hppa/crypto_arch.h | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/libcrypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/arch/hppa/Makefile.inc index 4244c20fef..c18e68d21c 100644 --- a/src/lib/libcrypto/arch/hppa/Makefile.inc +++ b/src/lib/libcrypto/arch/hppa/Makefile.inc | |||
| @@ -1,15 +1,22 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.29 2026/01/17 14:30:37 jsing Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.30 2026/01/17 16:18:32 jsing Exp $ |
| 2 | 2 | ||
| 3 | # hppa-specific libcrypto build rules | 3 | # hppa-specific libcrypto build rules |
| 4 | 4 | ||
| 5 | # aes | 5 | # aes |
| 6 | CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY | ||
| 6 | SSLASM+= aes aes-parisc aes-parisc | 7 | SSLASM+= aes aes-parisc aes-parisc |
| 8 | |||
| 7 | # bn | 9 | # bn |
| 10 | CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY | ||
| 8 | SSLASM+= bn parisc-mont parisc-mont | 11 | SSLASM+= bn parisc-mont parisc-mont |
| 9 | CFLAGS+= -DOPENSSL_BN_ASM_MONT | 12 | CFLAGS+= -DOPENSSL_BN_ASM_MONT |
| 13 | |||
| 10 | # modes | 14 | # modes |
| 15 | CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY | ||
| 11 | SSLASM+= modes ghash-parisc ghash-parisc | 16 | SSLASM+= modes ghash-parisc ghash-parisc |
| 17 | |||
| 12 | # sha | 18 | # sha |
| 19 | CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY | ||
| 13 | SSLASM+= sha sha1-parisc sha1-parisc | 20 | SSLASM+= sha sha1-parisc sha1-parisc |
| 14 | SSLASM+= sha sha512-parisc sha256-parisc | 21 | SSLASM+= sha sha512-parisc sha256-parisc |
| 15 | 22 | ||
diff --git a/src/lib/libcrypto/arch/hppa/crypto_arch.h b/src/lib/libcrypto/arch/hppa/crypto_arch.h index 80260c93e7..f1e7d2dcbf 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.3 2026/01/17 14:30:37 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.4 2026/01/17 16:18:32 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -20,17 +20,22 @@ | |||
| 20 | 20 | ||
| 21 | #ifndef OPENSSL_NO_ASM | 21 | #ifndef OPENSSL_NO_ASM |
| 22 | 22 | ||
| 23 | #ifdef LIBRESSL_USE_AES_ASSEMBLY | ||
| 23 | #define HAVE_AES_ENCRYPT_INTERNAL | 24 | #define HAVE_AES_ENCRYPT_INTERNAL |
| 24 | #define HAVE_AES_DECRYPT_INTERNAL | 25 | #define HAVE_AES_DECRYPT_INTERNAL |
| 26 | #endif | ||
| 25 | 27 | ||
| 28 | #ifdef LIBRESSL_USE_GCM_ASSEMBLY | ||
| 26 | #define HAVE_GCM_GHASH_4BIT | 29 | #define HAVE_GCM_GHASH_4BIT |
| 27 | #define HAVE_GCM_GMULT_4BIT | 30 | #define HAVE_GCM_GMULT_4BIT |
| 31 | #endif | ||
| 28 | 32 | ||
| 33 | #ifdef LIBRESSL_USE_SHA_ASSEMBLY | ||
| 29 | #define HAVE_SHA1_BLOCK_DATA_ORDER | 34 | #define HAVE_SHA1_BLOCK_DATA_ORDER |
| 30 | #define HAVE_SHA1_BLOCK_GENERIC | 35 | #define HAVE_SHA1_BLOCK_GENERIC |
| 31 | |||
| 32 | #define HAVE_SHA256_BLOCK_DATA_ORDER | 36 | #define HAVE_SHA256_BLOCK_DATA_ORDER |
| 33 | #define HAVE_SHA256_BLOCK_GENERIC | 37 | #define HAVE_SHA256_BLOCK_GENERIC |
| 38 | #endif | ||
| 34 | 39 | ||
| 35 | #endif | 40 | #endif |
| 36 | 41 | ||
