Skip to main content

extract_ssh_signature

Function extract_ssh_signature 

Source
pub fn extract_ssh_signature(
    commit_content: &str,
) -> Result<ExtractedSignature, CommitVerificationError>
Expand description

Extract the SSH signature PEM and signed payload from a raw git commit object.

The signed payload is the commit object with the gpgsig header block removed, preserving exact byte content including trailing newlines.

Args:

  • commit_content: The raw commit object as a string.

Usage:

let extracted = extract_ssh_signature(content)?;