Commit 94765b9e4cba8e3c51c292338db16aa174894d30
1 parent
1b87887d6c
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff
crypto/xcbc.c
... | ... | @@ -321,10 +321,7 @@ |
321 | 321 | inst->alg.cra_alignmask = alg->cra_alignmask; |
322 | 322 | inst->alg.cra_type = &crypto_hash_type; |
323 | 323 | |
324 | - inst->alg.cra_hash.digestsize = | |
325 | - (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) == | |
326 | - CRYPTO_ALG_TYPE_HASH ? alg->cra_hash.digestsize : | |
327 | - alg->cra_blocksize; | |
324 | + inst->alg.cra_hash.digestsize = alg->cra_blocksize; | |
328 | 325 | inst->alg.cra_ctxsize = sizeof(struct crypto_xcbc_ctx) + |
329 | 326 | ALIGN(inst->alg.cra_blocksize * 3, sizeof(void *)); |
330 | 327 | inst->alg.cra_init = xcbc_init_tfm; |