mirror of
https://github.com/openharmony/third_party_fsverity-utils.git
synced 2026-07-01 10:05:35 -04:00
Upgrade to latest fsverity_uapi.h
The latest UAPI header includes the declarations of fsverity_descriptor and fsverity_formatted_digest (previously fsverity_signed_digest). Therefore they no longer need to be declared in other files. Acked-by: Luca Boccassi <luca.boccassi@microsoft.com> Link: https://lore.kernel.org/r/20201113213314.73616-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
@@ -23,13 +23,6 @@ static const struct option longopts[] = {
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
struct fsverity_signed_digest {
|
||||
char magic[8]; /* must be "FSVerity" */
|
||||
__le16 digest_algorithm;
|
||||
__le16 digest_size;
|
||||
__u8 digest[];
|
||||
};
|
||||
|
||||
/*
|
||||
* Compute the fs-verity measurement of the given file(s), for offline signing.
|
||||
*/
|
||||
@@ -68,10 +61,10 @@ int fsverity_cmd_digest(const struct fsverity_command *cmd,
|
||||
goto out_usage;
|
||||
|
||||
for (int i = 0; i < argc; i++) {
|
||||
struct fsverity_signed_digest *d = NULL;
|
||||
struct fsverity_formatted_digest *d = NULL;
|
||||
struct libfsverity_digest *digest = NULL;
|
||||
char digest_hex[FS_VERITY_MAX_DIGEST_SIZE * 2 +
|
||||
sizeof(struct fsverity_signed_digest) * 2 + 1];
|
||||
sizeof(*d) * 2 + 1];
|
||||
|
||||
if (!open_file(&file, argv[i], O_RDONLY, 0))
|
||||
goto out_err;
|
||||
|
||||
Reference in New Issue
Block a user