Struct radicle_ssh::agent::client::AgentClient
source · pub struct AgentClient<S> { /* private fields */ }
Expand description
SSH agent client.
Implementations§
source§impl<S> AgentClient<S>
impl<S> AgentClient<S>
source§impl<S: ClientStream> AgentClient<S>
impl<S: ClientStream> AgentClient<S>
sourcepub fn add_identity<K>(
&mut self,
key: &K,
constraints: &[Constraint]
) -> Result<(), Error>
pub fn add_identity<K>( &mut self, key: &K, constraints: &[Constraint] ) -> Result<(), Error>
Send a key to the agent, with a (possibly empty) slice of constraints to apply when using the key to sign.
sourcepub fn add_smartcard_key(
&mut self,
id: &str,
pin: &[u8],
constraints: &[Constraint]
) -> Result<(), Error>
pub fn add_smartcard_key( &mut self, id: &str, pin: &[u8], constraints: &[Constraint] ) -> Result<(), Error>
Add a smart card to the agent, with a (possibly empty) set of constraints to apply when signing.
sourcepub fn lock(&mut self, passphrase: &[u8]) -> Result<(), Error>
pub fn lock(&mut self, passphrase: &[u8]) -> Result<(), Error>
Lock the agent, making it refuse to sign until unlocked.
sourcepub fn unlock(&mut self, passphrase: &[u8]) -> Result<(), Error>
pub fn unlock(&mut self, passphrase: &[u8]) -> Result<(), Error>
Unlock the agent, allowing it to sign again.
sourcepub fn request_identities<K>(&mut self) -> Result<Vec<K>, Error>
pub fn request_identities<K>(&mut self) -> Result<Vec<K>, Error>
Ask the agent for a list of the currently registered secret keys.
sourcepub fn sign<K>(&mut self, public: &K, data: &[u8]) -> Result<Signature, Error>
pub fn sign<K>(&mut self, public: &K, data: &[u8]) -> Result<Signature, Error>
Ask the agent to sign the supplied piece of data.
sourcepub fn remove_identity<K>(&mut self, public: &K) -> Result<(), Error>where
K: Encodable,
pub fn remove_identity<K>(&mut self, public: &K) -> Result<(), Error>where
K: Encodable,
Ask the agent to remove a key from its memory.
sourcepub fn remove_smartcard_key(
&mut self,
id: &str,
pin: &[u8]
) -> Result<(), Error>
pub fn remove_smartcard_key( &mut self, id: &str, pin: &[u8] ) -> Result<(), Error>
Ask the agent to remove a smartcard from its memory.
sourcepub fn remove_all_identities(&mut self) -> Result<(), Error>
pub fn remove_all_identities(&mut self) -> Result<(), Error>
Ask the agent to forget all known keys.
Auto Trait Implementations§
impl<S> Freeze for AgentClient<S>where
S: Freeze,
impl<S> RefUnwindSafe for AgentClient<S>where
S: RefUnwindSafe,
impl<S> Send for AgentClient<S>where
S: Send,
impl<S> Sync for AgentClient<S>where
S: Sync,
impl<S> Unpin for AgentClient<S>where
S: Unpin,
impl<S> UnwindSafe for AgentClient<S>where
S: UnwindSafe,
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