Skip to content

depending on libfsverity #233

Answered by alexlarsson
cgwalters asked this question in Q&A
Discussion options

You must be logged in to vote

That is not streaming in the same way we need. Yes, you can pass a read_fn to it, but the function is in control of calling it.

What we need it for is that when you call lcfs_write_to() we produce the output bytes one block at a time to a write callback, but we also pass those blocks to a streaming computation of the fs-verity digest. This means that once the image has been written to the caller the digest is available in options->digest out.

This is used for example in ostree when we just compute the digest for an image. If we were to do a two step thing that first creates the image file, and then pass it to libfsverity_compute_digest() we would have to keep the entire file on disk or in…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cgwalters
Comment options

cgwalters Dec 6, 2023
Maintainer Author

@alexlarsson
Comment options

Answer selected by cgwalters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #231 on December 05, 2023 13:07.