Module Audit_log.Verify

type report = {
  1. file : string;
  2. records : int;
  3. first_seq : int64;
  4. last_seq : int64;
  5. head_hash : string;
    (*

    hex; compare against an out-of-band anchor

    *)
  6. broken_at : int64 option;
    (*

    sequence number of the first record that fails

    *)
  7. reason : string option;
}
val report_to_string : report -> string
val file : string -> (report, string) Stdlib.result

Recompute the chain for one file from its genesis.

val directory : string -> (report list, string) Stdlib.result

Walk audit-*.log in a directory in order, checking that each file's recorded previous-hash matches the preceding file's head. Rotation must not be a place the chain can be broken without noticing.