diff options
Diffstat (limited to 'src/lib/libcrypto/sha/sha1_amd64.c')
| -rw-r--r-- | src/lib/libcrypto/sha/sha1_amd64.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/sha/sha1_amd64.c b/src/lib/libcrypto/sha/sha1_amd64.c index b3d4ab1263..2976cc7e6e 100644 --- a/src/lib/libcrypto/sha/sha1_amd64.c +++ b/src/lib/libcrypto/sha/sha1_amd64.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha1_amd64.c,v 1.1 2024/12/04 13:13:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha1_amd64.c,v 1.2 2024/12/06 11:57:18 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,9 +20,15 @@ | |||
| 20 | #include "crypto_arch.h" | 20 | #include "crypto_arch.h" |
| 21 | 21 | ||
| 22 | void sha1_block_generic(SHA_CTX *ctx, const void *in, size_t num); | 22 | void sha1_block_generic(SHA_CTX *ctx, const void *in, size_t num); |
| 23 | void sha1_block_shani(SHA_CTX *ctx, const void *in, size_t num); | ||
| 23 | 24 | ||
| 24 | void | 25 | void |
| 25 | sha1_block_data_order(SHA_CTX *ctx, const void *in, size_t num) | 26 | sha1_block_data_order(SHA_CTX *ctx, const void *in, size_t num) |
| 26 | { | 27 | { |
| 28 | if ((crypto_cpu_caps_amd64 & CRYPTO_CPU_CAPS_AMD64_SHA) != 0) { | ||
| 29 | sha1_block_shani(ctx, in, num); | ||
| 30 | return; | ||
| 31 | } | ||
| 32 | |||
| 27 | sha1_block_generic(ctx, in, num); | 33 | sha1_block_generic(ctx, in, num); |
| 28 | } | 34 | } |
