Skip to content

Commit

Permalink
Update to use the new hash-algorithm enum
Browse files Browse the repository at this point in the history
In the latest iteration of the overlay-verity patchset we changed
from using the IMA algorithm enum (HASH_ALGO_SHA256) to the
fs-verity specific one (FS_VERITY_HASH_ALG_SHA256).

Signed-off-by: Alexander Larsson <alexl@redhat.com>
  • Loading branch information
alexlarsson committed Jun 14, 2023
1 parent c9188cd commit d3b4b1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcomposefs/lcfs-writer-erofs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <sys/xattr.h>
#include <sys/param.h>
#include <assert.h>
#include <linux/hash_info.h>
#include <linux/fsverity.h>

struct lcfs_ctx_erofs_s {
struct lcfs_ctx_s base;
Expand Down Expand Up @@ -887,7 +887,7 @@ static int add_overlayfs_xattrs(struct lcfs_node_s *node)

if (node->digest_set) {
uint8_t xattr_data[1 + LCFS_DIGEST_SIZE];
xattr_data[0] = HASH_ALGO_SHA256;
xattr_data[0] = FS_VERITY_HASH_ALG_SHA256;
memcpy(xattr_data + 1, node->digest, LCFS_DIGEST_SIZE);
ret = lcfs_node_set_xattr(node, "trusted.overlay.verity",
(char *)xattr_data,
Expand Down

0 comments on commit d3b4b1a

Please sign in to comment.