aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Siewior <sebastian@breakpoint.cc>2008-03-30 04:36:09 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2008-04-20 22:19:23 -0400
commitc3715cb90f722b1cf5f6f073be02cc8a49659b90 (patch)
treeee1ec3eb75ee2083b41ee21dadc4342115f6e8fb
parent76cb9521795a167ae3d206343c072f602d84f815 (diff)
[CRYPTO] api: Make the crypto subsystem fully modular
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/Kconfig2
-rw-r--r--crypto/Makefile3
-rw-r--r--crypto/api.c3
-rw-r--r--include/linux/crypto.h7
4 files changed, 6 insertions, 9 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index e14ff1275018..edd00c5307a4 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -13,7 +13,7 @@ source "crypto/async_tx/Kconfig"
13# Cryptographic API Configuration 13# Cryptographic API Configuration
14# 14#
15menuconfig CRYPTO 15menuconfig CRYPTO
16 bool "Cryptographic API" 16 tristate "Cryptographic API"
17 help 17 help
18 This option provides the core Cryptographic API. 18 This option provides the core Cryptographic API.
19 19
diff --git a/crypto/Makefile b/crypto/Makefile
index 6d34bf7ecf8d..ca024418f4fb 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -2,7 +2,8 @@
2# Cryptographic API 2# Cryptographic API
3# 3#
4 4
5obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o 5obj-$(CONFIG_CRYPTO) += crypto.o
6crypto-objs := api.o cipher.o digest.o compress.o
6 7
7crypto_algapi-$(CONFIG_PROC_FS) += proc.o 8crypto_algapi-$(CONFIG_PROC_FS) += proc.o
8crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y) 9crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y)
diff --git a/crypto/api.c b/crypto/api.c
index a2496d1bc6d4..0a0f41ef255f 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -445,3 +445,6 @@ int crypto_has_alg(const char *name, u32 type, u32 mask)
445 return ret; 445 return ret;
446} 446}
447EXPORT_SYMBOL_GPL(crypto_has_alg); 447EXPORT_SYMBOL_GPL(crypto_has_alg);
448
449MODULE_DESCRIPTION("Cryptographic core API");
450MODULE_LICENSE("GPL");
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 5e02d1b46370..425824bd49f3 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -317,14 +317,7 @@ int crypto_unregister_alg(struct crypto_alg *alg);
317/* 317/*
318 * Algorithm query interface. 318 * Algorithm query interface.
319 */ 319 */
320#ifdef CONFIG_CRYPTO
321int crypto_has_alg(const char *name, u32 type, u32 mask); 320int crypto_has_alg(const char *name, u32 type, u32 mask);
322#else
323static inline int crypto_has_alg(const char *name, u32 type, u32 mask)
324{
325 return 0;
326}
327#endif
328 321
329/* 322/*
330 * Transforms: user-instantiated objects which encapsulate algorithms 323 * Transforms: user-instantiated objects which encapsulate algorithms