Skip to main content

pamoja_image_verifier_finish

Function pamoja_image_verifier_finish 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_image_verifier_finish( verifier: *mut PamojaImageVerifier, out_size: *mut u32, out_digest: *mut u8, ) -> PamojaStatus
Expand description

Settles an image against its manifest, consuming the verifier.

The handle is released whether the image matched or not, so it must not be used again after this call and must not also be passed to pamoja_image_verifier_free.

§Arguments

  • verifier - the verifier, consumed by this call.
  • out_size - receives the length of the image that was hashed.
  • out_digest - receives PAMOJA_UPDATE_DIGEST_LEN bytes of digest.

§Returns

PamojaStatus::Ok if the image is the one the manifest described, or a failure naming the rule it broke.

§Safety

verifier must be a live handle from pamoja_image_verifier_new that has not been freed, out_size must be writable or null, and out_digest must point to at least PAMOJA_UPDATE_DIGEST_LEN writable bytes or be null.