From b5e244b983dfb72335489c3756e6211e8d51a8a1 Mon Sep 17 00:00:00 2001 From: Chris <1731074+ccbrown@users.noreply.github.com> Date: Tue, 18 Feb 2025 04:06:39 -0500 Subject: [PATCH] populate comments for agent identities (#466) Previously, identities received from agents didn't have comments. The comments were parsed, but simply discarded. This PR assigns the comments to the identities. --- russh/src/keys/agent/client.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/russh/src/keys/agent/client.rs b/russh/src/keys/agent/client.rs index de9fedb7..a35c76f3 100644 --- a/russh/src/keys/agent/client.rs +++ b/russh/src/keys/agent/client.rs @@ -272,8 +272,10 @@ impl AgentClient { let n = u32::decode(&mut r)?; for _ in 0..n { let key_blob = Bytes::decode(&mut r)?; - let _comment = String::decode(&mut r)?; - keys.push(key::parse_public_key(&key_blob)?); + let comment = String::decode(&mut r)?; + let mut key = key::parse_public_key(&key_blob)?; + key.set_comment(comment); + keys.push(key); } }