Skip to main content

verify_commit

Function verify_commit 

Source
pub fn verify_commit(
    commit: &Commit,
    ref_path: &str,
    manifest: Option<&Manifest>,
) -> VerifyResult
Expand description

Verify a single commit against a manifest.

§Arguments

  • commit - The commit to verify.
  • ref_path - The ref path being pushed to.
  • manifest - Optional manifest. If None, only signature validity is checked.

§Returns

  • VerifyResult::Ok — Commit is valid and authorized (or no manifest).
  • VerifyResult::InvalidSignature — Ed25519 signature failed verification.
  • VerifyResult::Unsigned — Commit has no signature.
  • VerifyResult::Unauthorized — Signer not allowed to push to this ref.