Struct thrussh_keys::agent::client::AgentClient [−][src]
pub struct AgentClient<S: AsyncRead + AsyncWrite> { /* fields omitted */ }
Expand description
SSH agent client.
Implementations
impl<S: AsyncRead + AsyncWrite + Unpin> AgentClient<S>
[src]
impl<S: AsyncRead + AsyncWrite + Unpin> AgentClient<S>
[src]impl AgentClient<UnixStream>
[src]
impl AgentClient<UnixStream>
[src]pub async fn connect_uds<P: AsRef<Path>>(path: P) -> Result<Self, Error>
[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]
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]
impl<S: AsyncRead + AsyncWrite + Unpin> AgentClient<S>
[src]pub async fn add_identity(
&mut self,
key: &KeyPair,
constraints: &[Constraint]
) -> Result<(), Error>
[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]
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]
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]
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]
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 = (Self, Result<CryptoVec, Error>)>
[src]
pub fn sign_request(
self,
public: &PublicKey,
data: CryptoVec
) -> impl Future<Output = (Self, Result<CryptoVec, Error>)>
[src]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]
pub fn sign_request_base64(
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = (Self, Result<String, Error>)>
[src]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]
pub fn sign_request_signature(
self,
public: &PublicKey,
data: &[u8]
) -> impl Future<Output = Result<(Self, Signature), Error>>
[src]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]
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]
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]
pub async fn remove_all_identities(&mut self) -> Result<(), Error>
[src]Ask the agent to forget all known keys.
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,