diff options
author | jsing <> | 2024-08-11 13:02:39 +0000 |
---|---|---|
committer | jsing <> | 2024-08-11 13:02:39 +0000 |
commit | b0dd926baf4bcb43c9b178d7c252489f4434c5a8 (patch) | |
tree | 8b15d049ee9ab57d9d0970062ec6f18bd01c002c /src/lib/libcrypto/arch/amd64 | |
parent | 04ef9499c2bc221c90eb7bd81841524c46ffde33 (diff) | |
download | openbsd-b0dd926baf4bcb43c9b178d7c252489f4434c5a8.tar.gz openbsd-b0dd926baf4bcb43c9b178d7c252489f4434c5a8.tar.bz2 openbsd-b0dd926baf4bcb43c9b178d7c252489f4434c5a8.zip |
Provide and use crypto_arch.h.
Provide a per architecture crypto_arch.h - this will be used in a similar
manner to bn_arch.h and will allow for architecture specific #defines and
static inline functions. Move the HAVE_AES_* and HAVE_RC4_* defines here.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/arch/amd64')
-rw-r--r-- | src/lib/libcrypto/arch/amd64/Makefile.inc | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/amd64/crypto_arch.h | 34 |
2 files changed, 35 insertions, 8 deletions
diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc index 0cf212b186..dd136f76a7 100644 --- a/src/lib/libcrypto/arch/amd64/Makefile.inc +++ b/src/lib/libcrypto/arch/amd64/Makefile.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.28 2024/06/04 15:14:45 deraadt Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.29 2024/08/11 13:02:39 jsing Exp $ |
2 | 2 | ||
3 | # amd64-specific libcrypto build rules | 3 | # amd64-specific libcrypto build rules |
4 | 4 | ||
@@ -13,11 +13,6 @@ SSLASM+= aes bsaes-x86_64 | |||
13 | CFLAGS+= -DVPAES_ASM | 13 | CFLAGS+= -DVPAES_ASM |
14 | SSLASM+= aes vpaes-x86_64 | 14 | SSLASM+= aes vpaes-x86_64 |
15 | SSLASM+= aes aesni-x86_64 | 15 | SSLASM+= aes aesni-x86_64 |
16 | CFLAGS+= -DHAVE_AES_CBC_ENCRYPT_INTERNAL | ||
17 | CFLAGS+= -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
18 | CFLAGS+= -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
19 | CFLAGS+= -DHAVE_AES_ENCRYPT_INTERNAL | ||
20 | CFLAGS+= -DHAVE_AES_DECRYPT_INTERNAL | ||
21 | # bn | 16 | # bn |
22 | CFLAGS+= -DOPENSSL_IA32_SSE2 | 17 | CFLAGS+= -DOPENSSL_IA32_SSE2 |
23 | CFLAGS+= -DRSA_ASM | 18 | CFLAGS+= -DRSA_ASM |
@@ -48,8 +43,6 @@ SSLASM+= md5 md5-x86_64 | |||
48 | CFLAGS+= -DGHASH_ASM | 43 | CFLAGS+= -DGHASH_ASM |
49 | SSLASM+= modes ghash-x86_64 | 44 | SSLASM+= modes ghash-x86_64 |
50 | # rc4 | 45 | # rc4 |
51 | CFLAGS+= -DHAVE_RC4_INTERNAL | ||
52 | CFLAGS+= -DHAVE_RC4_SET_KEY_INTERNAL | ||
53 | SSLASM+= rc4 rc4-x86_64 | 46 | SSLASM+= rc4 rc4-x86_64 |
54 | # ripemd | 47 | # ripemd |
55 | # sha | 48 | # sha |
diff --git a/src/lib/libcrypto/arch/amd64/crypto_arch.h b/src/lib/libcrypto/arch/amd64/crypto_arch.h new file mode 100644 index 0000000000..8e91c25529 --- /dev/null +++ b/src/lib/libcrypto/arch/amd64/crypto_arch.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* $OpenBSD: crypto_arch.h,v 1.1 2024/08/11 13:02:39 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #ifndef HEADER_CRYPTO_ARCH_H | ||
19 | #define HEADER_CRYPTO_ARCH_H | ||
20 | |||
21 | #ifndef OPENSSL_NO_ASM | ||
22 | |||
23 | #define HAVE_AES_CBC_ENCRYPT_INTERNAL | ||
24 | #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
25 | #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
26 | #define HAVE_AES_ENCRYPT_INTERNAL | ||
27 | #define HAVE_AES_DECRYPT_INTERNAL | ||
28 | |||
29 | #define HAVE_RC4_INTERNAL | ||
30 | #define HAVE_RC4_SET_KEY_INTERNAL | ||
31 | |||
32 | #endif | ||
33 | |||
34 | #endif | ||