summaryrefslogtreecommitdiff
path: root/crypto/cipher.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-07-14 10:42:27 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:41:03 +1000
commitb5f08cf0634ffb7813c7303289940a1864c8c2a8 (patch)
tree19b120d2652d3b2b3ca78ebca5baa0e5e6077faf /crypto/cipher.c
parent2599b7b523bf0f140beb4a1c1294f6978898f67a (diff)
downloadlinux-crypto-b5f08cf0634ffb7813c7303289940a1864c8c2a8.tar.gz
linux-crypto-b5f08cf0634ffb7813c7303289940a1864c8c2a8.zip
[CRYPTO] cipher: Removed special IV checks for ECB
This patch makes IV operations on ECB fail through nocrypt_iv rather than calling BUG(). This is needed to generalise CBC/ECB using the template mechanism. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/cipher.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 56406a4a..aebc4a2a 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -399,6 +399,8 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm)
case CRYPTO_TFM_MODE_ECB:
ops->cit_encrypt = ecb_encrypt;
ops->cit_decrypt = ecb_decrypt;
+ ops->cit_encrypt_iv = nocrypt_iv;
+ ops->cit_decrypt_iv = nocrypt_iv;
break;
case CRYPTO_TFM_MODE_CBC: