aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/Makefile
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-07-12 16:22:54 -0700
committerEric Biggers <ebiggers@kernel.org>2025-07-14 08:58:53 -0700
commit90860aef630c5c9e58d05044f2866fcbfa7aa4d9 (patch)
tree62d827656851f779fda841e3fcc92498262aefba /lib/crypto/Makefile
parentlib/crypto: sha1: Rename sha1_init() to sha1_init_raw() (diff)
downloadlinux-90860aef630c5c9e58d05044f2866fcbfa7aa4d9.tar.gz
linux-90860aef630c5c9e58d05044f2866fcbfa7aa4d9.zip
lib/crypto: sha1: Add SHA-1 library functions
Add a library interface for SHA-1, following the SHA-2 one. As was the case with SHA-2, this will be useful for various in-kernel users. The crypto_shash interface will be reimplemented on top of it as well. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250712232329.818226-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'lib/crypto/Makefile')
-rw-r--r--lib/crypto/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index 533bb1533e19..0eb0906d693f 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -65,8 +65,13 @@ libpoly1305-generic-y := poly1305-donna32.o
libpoly1305-generic-$(CONFIG_ARCH_SUPPORTS_INT128) := poly1305-donna64.o
libpoly1305-generic-y += poly1305-generic.o
-obj-$(CONFIG_CRYPTO_LIB_SHA1) += libsha1.o
-libsha1-y := sha1.o
+################################################################################
+
+obj-$(CONFIG_CRYPTO_LIB_SHA1) += libsha1.o
+libsha1-y := sha1.o
+ifeq ($(CONFIG_CRYPTO_LIB_SHA1_ARCH),y)
+CFLAGS_sha1.o += -I$(src)/$(SRCARCH)
+endif # CONFIG_CRYPTO_LIB_SHA1_ARCH
################################################################################