Skip to main content

CommitSigningParams

Struct CommitSigningParams 

Source
pub struct CommitSigningParams {
    pub key_alias: String,
    pub namespace: String,
    pub data: Vec<u8>,
    pub pubkey: Vec<u8>,
    pub repo_path: Option<PathBuf>,
    pub max_passphrase_attempts: usize,
}
Expand description

Parameters for a commit signing operation.

Args:

  • key_alias: The keychain alias identifying the signing key.
  • namespace: The SSHSIG namespace (typically "git").
  • data: The raw bytes to sign (commit or tag content).
  • pubkey: Cached Ed25519 public key bytes for agent signing.
  • repo_path: Optional path to the auths repository for freeze validation.
  • max_passphrase_attempts: Maximum passphrase retry attempts (default 3).

Usage:

let params = CommitSigningParams::new("my-key", "git", commit_bytes)
    .with_pubkey(cached_pubkey)
    .with_repo_path(repo_path);

Fields§

§key_alias: String

Keychain alias for the signing key.

§namespace: String

SSHSIG namespace (e.g. "git").

§data: Vec<u8>

Raw bytes to sign.

§pubkey: Vec<u8>

Cached Ed25519 public key bytes for agent signing.

§repo_path: Option<PathBuf>

Optional auths repository path for freeze validation.

§max_passphrase_attempts: usize

Maximum number of passphrase attempts before returning PassphraseExhausted.

Implementations§

Source§

impl CommitSigningParams

Source

pub fn new( key_alias: impl Into<String>, namespace: impl Into<String>, data: Vec<u8>, ) -> Self

Create signing params with required fields.

Args:

  • key_alias: The keychain alias for the signing key.
  • namespace: The SSHSIG namespace.
  • data: The raw bytes to sign.
Source

pub fn with_pubkey(self, pubkey: Vec<u8>) -> Self

Set the cached public key for agent signing.

Source

pub fn with_repo_path(self, path: PathBuf) -> Self

Set the auths repository path for freeze validation.

Source

pub fn with_max_passphrase_attempts(self, max: usize) -> Self

Set the maximum number of passphrase attempts.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V