Skip to main content

verify_extracted_payload

Function verify_extracted_payload 

Source
pub fn verify_extracted_payload(
    release_document_path: &Path,
    options: &AttachOptions<'_>,
) -> Result<PayloadVerification>
Expand description

Proves an extracted tree is the one a signed release describes.

Deliberately standalone. Nothing calls it — not preparation, not attachment, not execution — because it reads every byte the box carries, and because a check that passed at one moment says nothing about the next: between here and a later import the tree can change, and no library can close that window. Filesystem permissions do, and they belong to the operating system and the application. What this answers is narrower and worth answering: is this directory the box that release describes, and is it still whole.

§Errors

When the release commits to no payload digest, the list is missing or does not match the signed value, or any entry it names is absent, of the wrong kind, or of different content.