Skip to main content

pamoja_audit_verify_chain

Function pamoja_audit_verify_chain 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_audit_verify_chain( public_key: *const u8, entries: *const *const PamojaAuditEntry, count: usize, ) -> PamojaStatus
Expand description

Checks a whole chain that has already arrived.

§Arguments

  • public_key - the PAMOJA_KEY_LEN-byte key the entries were signed with.
  • entries - an array of entry handles, in the order they were written.
  • count - how many handles entries holds.

§Returns

PamojaStatus::Ok if every entry follows the one before it and carries a signature that holds, or PamojaStatus::Auth if any does not.

§Safety

public_key must point to at least PAMOJA_KEY_LEN readable bytes, and entries must point to at least count live entry handles, none of them null, or be null when count is 0.