diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-31 23:49:17 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 16:17:00 -0500 |
commit | 94765b9e4cba8e3c51c292338db16aa174894d30 (patch) | |
tree | 9f444b1543acf431c8d4ca5c0d100b270220c1a2 /crypto | |
parent | 1b87887d6c232becba77835b29a424cf78442b7d (diff) |
[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')
-rw-r--r-- | crypto/xcbc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/xcbc.c b/crypto/xcbc.c index e3d9503a034b..a82959df678c 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c | |||
@@ -321,10 +321,7 @@ static struct crypto_instance *xcbc_alloc(struct rtattr **tb) | |||
321 | inst->alg.cra_alignmask = alg->cra_alignmask; | 321 | inst->alg.cra_alignmask = alg->cra_alignmask; |
322 | inst->alg.cra_type = &crypto_hash_type; | 322 | inst->alg.cra_type = &crypto_hash_type; |
323 | 323 | ||
324 | inst->alg.cra_hash.digestsize = | 324 | inst->alg.cra_hash.digestsize = alg->cra_blocksize; |
325 | (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) == | ||
326 | CRYPTO_ALG_TYPE_HASH ? alg->cra_hash.digestsize : | ||
327 | alg->cra_blocksize; | ||
328 | inst->alg.cra_ctxsize = sizeof(struct crypto_xcbc_ctx) + | 325 | inst->alg.cra_ctxsize = sizeof(struct crypto_xcbc_ctx) + |
329 | ALIGN(inst->alg.cra_blocksize * 3, sizeof(void *)); | 326 | ALIGN(inst->alg.cra_blocksize * 3, sizeof(void *)); |
330 | inst->alg.cra_init = xcbc_init_tfm; | 327 | inst->alg.cra_init = xcbc_init_tfm; |