summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Siewior <sebastian@breakpoint.cc>2007-10-08 11:45:10 +0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:50 -0700
commita21c5c25e48e9dcaeaf66ed3bb81259d16883e0d (patch)
tree2a615f39b341bd81a9d7a379ab514dffbc1f589b
parent09169de03240d3bbcae4bf609363bda3adf63e9a (diff)
downloadlinux-crypto-a21c5c25e48e9dcaeaf66ed3bb81259d16883e0d.tar.gz
linux-crypto-a21c5c25e48e9dcaeaf66ed3bb81259d16883e0d.zip
[CRYPTO] sha: Load the SHA[1|256] module by an alias
Loading the crypto algorithm by the alias instead of by module directly has the advantage that all possible implementations of this algorithm are loaded automatically and the crypto API can choose the best one depending on its priority. Additionally it ensures that the generic implementation as well as the HW driver (if available) is loaded in case the HW driver needs the generic version as fallback in corner cases. Also remove the probe for sha1 in padlock's init code. Quote from Herbert: The probe is actually pointless since we can always probe when the algorithm is actually used which does not lead to dead-locks like this. Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/Makefile4
-rw-r--r--crypto/sha1_generic.c (renamed from crypto/sha1.c)2
-rw-r--r--crypto/sha256_generic.c (renamed from crypto/sha256.c)2
3 files changed, 4 insertions, 4 deletions
diff --git a/crypto/Makefile b/crypto/Makefile
index b6ef5e4f..43c2a0dc 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -21,8 +21,8 @@ obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o
obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o
obj-$(CONFIG_CRYPTO_MD4) += md4.o
obj-$(CONFIG_CRYPTO_MD5) += md5.o
-obj-$(CONFIG_CRYPTO_SHA1) += sha1.o
-obj-$(CONFIG_CRYPTO_SHA256) += sha256.o
+obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o
+obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
obj-$(CONFIG_CRYPTO_SHA512) += sha512.o
obj-$(CONFIG_CRYPTO_WP512) += wp512.o
obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
diff --git a/crypto/sha1.c b/crypto/sha1_generic.c
index 1bba551e..70364dd5 100644
--- a/crypto/sha1.c
+++ b/crypto/sha1_generic.c
@@ -139,4 +139,4 @@ module_exit(fini);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm");
-MODULE_ALIAS("sha1-generic");
+MODULE_ALIAS("sha1");
diff --git a/crypto/sha256.c b/crypto/sha256_generic.c
index 716195bb..74bf2f95 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256_generic.c
@@ -339,4 +339,4 @@ module_exit(fini);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm");
-MODULE_ALIAS("sha256-generic");
+MODULE_ALIAS("sha256");