diff options
author | Eric Biggers <ebiggers@google.com> | 2021-01-15 10:18:15 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2021-02-07 14:51:09 -0800 |
commit | fab634c4de4604aefaaa9dc25d0e1a2cb7a961ab (patch) | |
tree | 48f94c89cb86c43b472738346720887757e839e2 /fs/verity/fsverity_private.h | |
parent | c2c8261151b32f1956fc4ecd71c9a3e7972084b6 (diff) | |
download | linux-fab634c4de4604aefaaa9dc25d0e1a2cb7a961ab.tar.bz2 |
fs-verity: don't pass whole descriptor to fsverity_verify_signature()
Now that fsverity_get_descriptor() validates the sig_size field,
fsverity_verify_signature() doesn't need to do it.
Just change the prototype of fsverity_verify_signature() to take the
signature directly rather than take a fsverity_descriptor.
Link: https://lore.kernel.org/r/20210115181819.34732-3-ebiggers@kernel.org
Reviewed-by: Victor Hsieh <victorhsieh@google.com>
Reviewed-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Amy Parker <enbyamy@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/verity/fsverity_private.h')
-rw-r--r-- | fs/verity/fsverity_private.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/verity/fsverity_private.h b/fs/verity/fsverity_private.h index 6c9caccc0602..a7920434bae5 100644 --- a/fs/verity/fsverity_private.h +++ b/fs/verity/fsverity_private.h @@ -140,15 +140,13 @@ void __init fsverity_exit_info_cache(void); #ifdef CONFIG_FS_VERITY_BUILTIN_SIGNATURES int fsverity_verify_signature(const struct fsverity_info *vi, - const struct fsverity_descriptor *desc, - size_t desc_size); + const u8 *signature, size_t sig_size); int __init fsverity_init_signature(void); #else /* !CONFIG_FS_VERITY_BUILTIN_SIGNATURES */ static inline int fsverity_verify_signature(const struct fsverity_info *vi, - const struct fsverity_descriptor *desc, - size_t desc_size) + const u8 *signature, size_t sig_size) { return 0; } |