[−][src]Struct thrussh_keys::agent::client::AgentClient
SSH agent client.
Implementations
impl<S: AsyncRead + AsyncWrite + Unpin> AgentClient<S>
[src]
pub fn connect(stream: S) -> Self
[src]
Build a future that connects to an SSH agent via the provided stream (on Unix, usually a Unix-domain socket).
impl AgentClient<UnixStream>
[src]
pub async fn connect_uds<P: AsRef<Path>>(path: P) -> Result<Self, Error>
[src]
Build a future that connects to an SSH agent via the provided stream (on Unix, usually a Unix-domain socket).
pub async fn connect_env() -> Result<Self, Error>
[src]
Build a future that connects to an SSH agent via the provided stream (on Unix, usually a Unix-domain socket).
impl<S: AsyncRead + AsyncWrite + Unpin> AgentClient<S>
[src]
pub async fn add_identity<'_, '_, '_>(
&'_ mut self,
key: &'_ KeyPair,
constraints: &'_ [Constraint]
) -> Result<(), Error>
[src]
&'_ mut self,
key: &'_ KeyPair,
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.
pub async fn add_smartcard_key<'_, '_, '_, '_>(
&'_ mut self,
id: &'_ str,
pin: &'_ [u8],
constraints: &'_ [Constraint]
) -> Result<(), Error>
[src]
&'_ 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.
pub async fn lock<'_, '_>(
&'_ mut self,
passphrase: &'_ [u8]
) -> Result<(), Error>
[src]
&'_ mut self,
passphrase: &'_ [u8]
) -> Result<(), Error>
Lock the agent, making it refuse to sign until unlocked.
pub async fn unlock<'_, '_>(
&'_ mut self,
passphrase: &'_ [u8]
) -> Result<(), Error>
[src]
&'_ mut self,
passphrase: &'_ [u8]
) -> Result<(), Error>
Unlock the agent, allowing it to sign again.
pub async fn request_identities<'_>(
&'_ mut self
) -> Result<Vec<PublicKey>, Error>
[src]
&'_ mut self
) -> Result<Vec<PublicKey>, Error>
Ask the agent for a list of the currently registered secret keys.
pub fn sign_request(
self,
public: &PublicKey,
data: CryptoVec
) -> impl Future<Output = (Self, Result<CryptoVec, Error>)>
[src]
self,
public: &PublicKey,
data: CryptoVec
) -> impl Future<Output = (Self, Result<CryptoVec, Error>)>
Ask the agent to sign the supplied piece of data.
pub fn sign_request_base64(
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = (Self, Result<String, Error>)>
[src]
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = (Self, Result<String, Error>)>
Ask the agent to sign the supplied piece of data.
pub fn sign_request_signature(
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = Result<(Self, Signature), Error>>
[src]
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = Result<(Self, Signature), Error>>
Ask the agent to sign the supplied piece of data, and return a Signature
.
pub async fn remove_identity<'_, '_>(
&'_ mut self,
public: &'_ PublicKey
) -> Result<(), Error>
[src]
&'_ mut self,
public: &'_ PublicKey
) -> Result<(), Error>
Ask the agent to remove a key from its memory.
pub async fn remove_smartcard_key<'_, '_, '_>(
&'_ mut self,
id: &'_ str,
pin: &'_ [u8]
) -> Result<(), Error>
[src]
&'_ mut self,
id: &'_ str,
pin: &'_ [u8]
) -> Result<(), Error>
Ask the agent to remove a smartcard from its memory.
pub async fn remove_all_identities<'_>(&'_ mut self) -> Result<(), Error>
[src]
Ask the agent to forget all known keys.
pub async fn extension<'_, '_, '_>(
&'_ mut self,
typ: &'_ [u8],
ext: &'_ [u8]
) -> Result<(), Error>
[src]
&'_ mut self,
typ: &'_ [u8],
ext: &'_ [u8]
) -> Result<(), Error>
Send a custom message to the agent.
pub async fn query_extension<'_, '_>(
&'_ mut self,
typ: &'_ [u8],
ext: CryptoVec
) -> Result<bool, Error>
[src]
&'_ mut self,
typ: &'_ [u8],
ext: CryptoVec
) -> Result<bool, Error>
Ask the agent what extensions about supported extensions.
Auto Trait Implementations
impl<S> RefUnwindSafe for AgentClient<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for AgentClient<S> where
S: Send,
S: Send,
impl<S> Sync for AgentClient<S> where
S: Sync,
S: Sync,
impl<S> Unpin for AgentClient<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for AgentClient<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,