Skip to content

Commit

Permalink
populate comments for agent identities (#466)
Browse files Browse the repository at this point in the history
Previously, identities received from agents didn't have comments. The
comments were parsed, but simply discarded. This PR assigns the comments
to the identities.
  • Loading branch information
ccbrown authored Feb 18, 2025
1 parent f4ba544 commit b5e244b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions russh/src/keys/agent/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ impl<S: AgentStream + Unpin> AgentClient<S> {
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);
}
}

Expand Down

0 comments on commit b5e244b

Please # to comment.