From d94749a6fc10fb36851763fa837fa20748669a7b Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 14 Jul 2006 10:42:27 +1000 Subject: [PATCH] --- yaml --- r: 34225 b: refs/heads/master c: df89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91 h: refs/heads/master i: 34223: 836e559840f7b1ce0f8c06ced296f9abd3142ca0 v: v3 --- [refs] | 2 +- trunk/crypto/cipher.c | 2 ++ trunk/include/linux/crypto.h | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fa061946123f..6d52edc66f81 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c907ee76d8456fe1d98f40b5febfc7802a73b784 +refs/heads/master: df89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91 diff --git a/trunk/crypto/cipher.c b/trunk/crypto/cipher.c index 56406a4a88d4..aebc4a2adc80 100644 --- a/trunk/crypto/cipher.c +++ b/trunk/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: diff --git a/trunk/include/linux/crypto.h b/trunk/include/linux/crypto.h index 053bfab43e8d..dbdfc7c79367 100644 --- a/trunk/include/linux/crypto.h +++ b/trunk/include/linux/crypto.h @@ -422,7 +422,6 @@ static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, unsigned int nbytes, u8 *iv) { BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); - BUG_ON(tfm->crt_cipher.cit_mode == CRYPTO_TFM_MODE_ECB); return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); } @@ -441,7 +440,6 @@ static inline int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, unsigned int nbytes, u8 *iv) { BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); - BUG_ON(tfm->crt_cipher.cit_mode == CRYPTO_TFM_MODE_ECB); return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); }