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: StringKeychain alias for the signing key.
namespace: StringSSHSIG 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: usizeMaximum number of passphrase attempts before returning PassphraseExhausted.
Implementations§
Source§impl CommitSigningParams
impl CommitSigningParams
Sourcepub fn new(
key_alias: impl Into<String>,
namespace: impl Into<String>,
data: Vec<u8>,
) -> Self
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.
Sourcepub fn with_pubkey(self, pubkey: Vec<u8>) -> Self
pub fn with_pubkey(self, pubkey: Vec<u8>) -> Self
Set the cached public key for agent signing.
Sourcepub fn with_repo_path(self, path: PathBuf) -> Self
pub fn with_repo_path(self, path: PathBuf) -> Self
Set the auths repository path for freeze validation.
Sourcepub fn with_max_passphrase_attempts(self, max: usize) -> Self
pub fn with_max_passphrase_attempts(self, max: usize) -> Self
Set the maximum number of passphrase attempts.
Auto Trait Implementations§
impl Freeze for CommitSigningParams
impl RefUnwindSafe for CommitSigningParams
impl Send for CommitSigningParams
impl Sync for CommitSigningParams
impl Unpin for CommitSigningParams
impl UnsafeUnpin for CommitSigningParams
impl UnwindSafe for CommitSigningParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more