summaryrefslogtreecommitdiff
path: root/crypto/xcbc.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-01-01 15:49:17 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:17:00 +1100
commitbaece5759dbbe1cc0277271a39c9ec3fbb6b41d4 (patch)
tree6164025ebdbb0096d885e2c42b13c9b3f90ef7de /crypto/xcbc.c
parent81d15d3d86fdd377abebaafb114950861fd956db (diff)
downloadlinux-crypto-baece5759dbbe1cc0277271a39c9ec3fbb6b41d4.tar.gz
linux-crypto-baece5759dbbe1cc0277271a39c9ec3fbb6b41d4.zip
[CRYPTO] xcbc: Remove bogus hash/cipher test
When setting the digest size xcbc tests to see if the underlying algorithm is a hash. This is silly because we don't allow it to be a hash and we've specifically requested for a cipher. This patch removes the bogus test. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/xcbc.c')
-rw-r--r--crypto/xcbc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/xcbc.c b/crypto/xcbc.c
index e3d9503a..a82959df 100644
--- a/crypto/xcbc.c
+++ b/crypto/xcbc.c
@@ -321,10 +321,7 @@ static struct crypto_instance *xcbc_alloc(struct rtattr **tb)
inst->alg.cra_alignmask = alg->cra_alignmask;
inst->alg.cra_type = &crypto_hash_type;
- inst->alg.cra_hash.digestsize =
- (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) ==
- CRYPTO_ALG_TYPE_HASH ? alg->cra_hash.digestsize :
- alg->cra_blocksize;
+ inst->alg.cra_hash.digestsize = alg->cra_blocksize;
inst->alg.cra_ctxsize = sizeof(struct crypto_xcbc_ctx) +
ALIGN(inst->alg.cra_blocksize * 3, sizeof(void *));
inst->alg.cra_init = xcbc_init_tfm;