From 9e7bea62b5ef7bdbd8fea81d2bff57090de86dbf Mon Sep 17 00:00:00 2001 From: Matt Johnston <matt@ucc.asn.au> Date: Sat, 13 May 2023 19:41:59 +0800 Subject: [PATCH] std feature shouldn't imply rsa A cutdown std program may only want ed25519 --- Cargo.toml | 2 +- async/Cargo.toml | 2 +- async/src/agent.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 718f669..b995e80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,7 +65,7 @@ pretty-hex = { version = "0.3", default-features = false } futures = { version = "0.3", default-features = false } [features] -std = ["snafu/std", "snafu/backtraces", "rsa"] +std = ["snafu/std", "snafu/backtraces"] rsa = ["dep:rsa", "ssh-key/rsa"] # allows conversion to/from OpenSSH key formats openssh-key = ["ssh-key"] diff --git a/async/Cargo.toml b/async/Cargo.toml index 39020ea..4c44453 100644 --- a/async/Cargo.toml +++ b/async/Cargo.toml @@ -7,7 +7,7 @@ license = "MPL-2.0" description = "Async wrapper for Sunset SSH" [dependencies] -sunset = { path = "..", features = ["std", "openssh-key"] } + sunset = { path = "..", features = ["std", "rsa", "openssh-key"] } sunset-sshwire-derive = { version = "0.1", path = "../sshwire-derive" } sunset-embassy = { path = "../embassy" } log = { version = "0.4", features = ["release_max_level_trace"] } diff --git a/async/src/agent.rs b/async/src/agent.rs index d022a7c..7d99274 100644 --- a/async/src/agent.rs +++ b/async/src/agent.rs @@ -166,6 +166,7 @@ impl AgentClient { pub async fn sign_auth(&mut self, key: &SignKey, msg: &AuthSigMsg<'_>) -> Result<OwnedSig> { let flags = match key { + #[cfg(feature = "rsa")] SignKey::AgentRSA(_) => SSH_AGENT_FLAG_RSA_SHA2_256, _ => 0, }; -- GitLab