[][src]Struct thrussh_keys::agent::client::AgentClient

pub struct AgentClient<S: AsyncRead + AsyncWrite> { /* fields omitted */ }

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]

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]

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]

Lock the agent, making it refuse to sign until unlocked.

pub async fn unlock<'_, '_>(
    &'_ mut self,
    passphrase: &'_ [u8]
) -> Result<(), Error>
[src]

Unlock the agent, allowing it to sign again.

pub async fn request_identities<'_>(
    &'_ mut self
) -> Result<Vec<PublicKey>, Error>
[src]

Ask the agent for a list of the currently registered secret keys.

pub fn sign_request(
    self,
    public: &PublicKey,
    data: CryptoVec
) -> impl Future<Output = Result<(Self, CryptoVec), Error>>
[src]

Ask the agent to sign the supplied piece of data.

pub async fn remove_identity<'_, '_>(
    &'_ mut self,
    public: &'_ PublicKey
) -> Result<(), Error>
[src]

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]

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]

Send a custom message to the agent.

pub async fn query_extension<'_, '_>(
    &'_ mut self,
    typ: &'_ [u8],
    __arg2: CryptoVec
) -> Result<bool, Error>
[src]

Ask the agent what extensions about supported extensions.

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.