Skip to main content

refresh_commit_trailers

Function refresh_commit_trailers 

Source
pub fn refresh_commit_trailers(
    ctx: &AuthsContext,
    auths_home: &Path,
) -> Result<(), CommitHookError>
Expand description

Rewrite the trailer data file from the locally-resolved signer, including the current root-KEL position as Auths-Anchor-Seq.

Call this after any operation that advances the root KEL or changes the signing identity — rotation, device add/remove, agent add/revoke, pairing — so hook-stamped commits carry an up-to-date anchor position (the verifier uses it to order commits against later revocations). A missing anchor seq (non-transferable roots) simply omits the line.

Args:

  • ctx: Auths context (identity storage + registry, read-only).
  • auths_home: The auths data directory holding commit-trailers.

Usage:

refresh_commit_trailers(&ctx, &auths_home)?;