diff options
Diffstat (limited to 'fs/verity')
-rw-r--r-- | fs/verity/fsverity_private.h | 2 | ||||
-rw-r--r-- | fs/verity/hash_algs.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/verity/fsverity_private.h b/fs/verity/fsverity_private.h index eaa2b3b93bbf..02a547f0667c 100644 --- a/fs/verity/fsverity_private.h +++ b/fs/verity/fsverity_private.h @@ -29,7 +29,7 @@ struct ahash_request; * Largest digest size among all hash algorithms supported by fs-verity. * Currently assumed to be <= size of fsverity_descriptor::root_hash. */ -#define FS_VERITY_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE +#define FS_VERITY_MAX_DIGEST_SIZE SHA512_DIGEST_SIZE /* A hash algorithm supported by fs-verity */ struct fsverity_hash_alg { diff --git a/fs/verity/hash_algs.c b/fs/verity/hash_algs.c index 7df1d67742b8..31e6d7d2389a 100644 --- a/fs/verity/hash_algs.c +++ b/fs/verity/hash_algs.c @@ -17,6 +17,11 @@ struct fsverity_hash_alg fsverity_hash_algs[] = { .digest_size = SHA256_DIGEST_SIZE, .block_size = SHA256_BLOCK_SIZE, }, + [FS_VERITY_HASH_ALG_SHA512] = { + .name = "sha512", + .digest_size = SHA512_DIGEST_SIZE, + .block_size = SHA512_BLOCK_SIZE, + }, }; /** |