mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-14 16:35:06 +01:00
cleanup
This commit is contained in:
parent
b6d0675976
commit
b0acf03502
22 changed files with 84 additions and 26 deletions
|
|
@ -4,7 +4,10 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
eyre = "0.6.12"
|
||||
eyre.workspace = true
|
||||
cluelessh-transport = { path = "../cluelessh-transport" }
|
||||
tokio = { version = "1.39.3", features = ["net"] }
|
||||
tracing.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ impl Request {
|
|||
} => {
|
||||
p.u8(numbers::SSH_AGENTC_ADD_IDENTITY);
|
||||
p.string(key_type.as_bytes());
|
||||
p.raw(&key_contents);
|
||||
p.raw(key_contents);
|
||||
p.string(key_comment.as_bytes());
|
||||
}
|
||||
Self::RemoveAllIdentities => p.u8(numbers::SSH_AGENTC_REMOVE_ALL_IDENTITIES),
|
||||
|
|
@ -56,8 +56,8 @@ impl Request {
|
|||
flags,
|
||||
} => {
|
||||
p.u8(numbers::SSH_AGENTC_SIGN_REQUEST);
|
||||
p.string(&key_blob);
|
||||
p.string(&data);
|
||||
p.string(key_blob);
|
||||
p.string(data);
|
||||
p.u32(*flags);
|
||||
}
|
||||
Self::Lock { passphrase } => {
|
||||
|
|
@ -186,7 +186,7 @@ impl AgentConnection {
|
|||
mut bytes: &'a [u8],
|
||||
) -> impl Iterator<Item = eyre::Result<ServerResponse>> + 'a {
|
||||
std::iter::from_fn(move || -> Option<eyre::Result<ServerResponse>> {
|
||||
if bytes.len() == 0 {
|
||||
if bytes.is_empty() {
|
||||
return None;
|
||||
}
|
||||
match self.packets.recv_plaintext_bytes(bytes) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue