summaryrefslogtreecommitdiff
path: root/crypto/blkcipher.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-02-23 11:12:06 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-02-23 11:12:06 +0800
commit19b2cd2a5501654fa36272e117a3af6a21108e31 (patch)
treeb4ec610601bb6027f3b44e19685b86eb49b4214b /crypto/blkcipher.c
parente80829107b8f7545e23879080ded4a758800ab95 (diff)
downloadlinux-crypto-19b2cd2a5501654fa36272e117a3af6a21108e31.tar.gz
linux-crypto-19b2cd2a5501654fa36272e117a3af6a21108e31.zip
[CRYPTO] skcipher: Move chainiv/seqiv into crypto_blkcipher module
For compatibility with dm-crypt initramfs setups it is useful to merge chainiv/seqiv into the crypto_blkcipher module. Since they're required by most algorithms anyway this is an acceptable trade-off. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/blkcipher.c')
-rw-r--r--crypto/blkcipher.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 4a7e65c4..185f955f 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -696,5 +696,34 @@ void skcipher_geniv_exit(struct crypto_tfm *tfm)
}
EXPORT_SYMBOL_GPL(skcipher_geniv_exit);
+static int __init blkcipher_module_init(void)
+{
+ int err;
+
+ err = chainiv_module_init();
+ if (err)
+ goto out;
+
+ err = eseqiv_module_init();
+ if (err)
+ goto eseqiv_err;
+
+out:
+ return err;
+
+eseqiv_err:
+ chainiv_module_exit();
+ goto out;
+}
+
+static void __exit blkcipher_module_exit(void)
+{
+ eseqiv_module_exit();
+ chainiv_module_exit();
+}
+
+module_init(blkcipher_module_init);
+module_exit(blkcipher_module_exit);
+
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic block chaining cipher type");