pub struct CliAgentAdapter;Expand description
CLI adapter that delegates signing to the Unix SSH agent.
On non-Unix platforms this struct is not compiled; the CLI wires
NoopAgentProvider instead.
Usage:
ⓘ
let adapter = CliAgentAdapter;
let pem = adapter.try_sign("git", &pubkey, &data)?;Trait Implementations§
Source§impl AgentSigningPort for CliAgentAdapter
Available on Unix only.
impl AgentSigningPort for CliAgentAdapter
Available on Unix only.
Source§fn try_sign(
&self,
namespace: &str,
pubkey: &[u8],
data: &[u8],
) -> Result<String, AgentSigningError>
fn try_sign( &self, namespace: &str, pubkey: &[u8], data: &[u8], ) -> Result<String, AgentSigningError>
Attempt to sign
data via the running agent. Read moreSource§fn ensure_running(&self) -> Result<(), AgentSigningError>
fn ensure_running(&self) -> Result<(), AgentSigningError>
Start the agent daemon if it is not already running. Read more
Source§fn add_identity(
&self,
_namespace: &str,
pkcs8_der: &[u8],
) -> Result<(), AgentSigningError>
fn add_identity( &self, _namespace: &str, pkcs8_der: &[u8], ) -> Result<(), AgentSigningError>
Load a decrypted PKCS#8 DER-encoded keypair into the running agent. Read more
Auto Trait Implementations§
impl Freeze for CliAgentAdapter
impl RefUnwindSafe for CliAgentAdapter
impl Send for CliAgentAdapter
impl Sync for CliAgentAdapter
impl Unpin for CliAgentAdapter
impl UnsafeUnpin for CliAgentAdapter
impl UnwindSafe for CliAgentAdapter
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