X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fblkcipher.c;h=185f955fb0d7f79770b7765660bd1a9cbbcfab2e;hb=6526128c18564697b301030a7bbf928209e49ae0;hp=ca6ef065cded9dde065e71922d5f8a3f7657a0b3;hpb=ecfc43292f68566c144afca966b46b371c26d56c;p=linux-2.6-omap-h63xx.git diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index ca6ef065cde..185f955fb0d 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -450,6 +450,10 @@ static int crypto_init_blkcipher_ops_async(struct crypto_tfm *tfm) crt->setkey = async_setkey; crt->encrypt = async_encrypt; crt->decrypt = async_decrypt; + if (!alg->ivsize) { + crt->givencrypt = skcipher_null_givencrypt; + crt->givdecrypt = skcipher_null_givdecrypt; + } crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; @@ -692,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");