crypto: skcipher - remove crypto_skcipher::keysize
Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::keysize is now redundant since it always equals crypto_skcipher_alg(tfm)->max_keysize. Remove it and update crypto_skcipher_default_keysize() accordingly. Also rename crypto_skcipher_default_keysize() to crypto_skcipher_max_keysize() to clarify that it specifically returns the maximum key size, not some unspecified "default". Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -1586,7 +1586,7 @@ ecryptfs_process_key_cipher(struct crypto_skcipher **key_tfm,
|
||||
}
|
||||
crypto_skcipher_set_flags(*key_tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS);
|
||||
if (*key_size == 0)
|
||||
*key_size = crypto_skcipher_default_keysize(*key_tfm);
|
||||
*key_size = crypto_skcipher_max_keysize(*key_tfm);
|
||||
get_random_bytes(dummy_key, *key_size);
|
||||
rc = crypto_skcipher_setkey(*key_tfm, dummy_key, *key_size);
|
||||
if (rc) {
|
||||
|
Reference in New Issue
Block a user