diff --git a/russh/Cargo.toml b/russh/Cargo.toml index 7a0a78d0..73080582 100644 --- a/russh/Cargo.toml +++ b/russh/Cargo.toml @@ -120,3 +120,8 @@ tempfile = "3.14.0" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] russh-sftp = "2.0.5" tokio.workspace = true + +[[example]] +name = "sftp_server" +path = "examples/sftp_server.rs" +required-features = ["async-trait"] diff --git a/russh/src/auth.rs b/russh/src/auth.rs index 62ad4029..018d740c 100644 --- a/russh/src/auth.rs +++ b/russh/src/auth.rs @@ -173,15 +173,17 @@ impl Signer { type Error = AgentAuthError; - async fn auth_publickey_sign( + fn auth_publickey_sign( &mut self, key: &ssh_key::PublicKey, hash_alg: Option, to_sign: CryptoVec, - ) -> Result { - self.sign_request(key, hash_alg, to_sign) - .await - .map_err(Into::into) + ) -> impl Future> { + async move { + self.sign_request(key, hash_alg, to_sign) + .await + .map_err(Into::into) + } } }