]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[CRYPTO] xcbc: Remove bogus hash/cipher test
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 1 Jan 2008 04:49:17 +0000 (15:49 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jan 2008 21:17:00 +0000 (08:17 +1100)
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>
crypto/xcbc.c

index e3d9503a034b5774f0000174b7cec9363f50206e..a82959df678c3741f17b9a6bb30bbaf63a540524 100644 (file)
@@ -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;