Skip to content

Commit a0118c8

Browse files
Russell Kingherbertx
authored andcommitted
crypto: caam - fix non-hmac hashes
Since 6de62f1 ("crypto: algif_hash - Require setkey before accept(2)"), the AF_ALG interface requires userspace to provide a key to any algorithm that has a setkey method. However, the non-HMAC algorithms are not keyed, so setting a key is unnecessary. Fix this by removing the setkey method from the non-keyed hash algorithms. Fixes: 6de62f1 ("crypto: algif_hash - Require setkey before accept(2)") Cc: <[email protected]> Signed-off-by: Russell King <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent c12abf3 commit a0118c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/crypto/caam/caamhash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,7 @@ caam_hash_alloc(struct caam_hash_template *template,
18981898
template->name);
18991899
snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s",
19001900
template->driver_name);
1901+
t_alg->ahash_alg.setkey = NULL;
19011902
}
19021903
alg->cra_module = THIS_MODULE;
19031904
alg->cra_init = caam_hash_cra_init;

0 commit comments

Comments
 (0)