mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-14 16:35:06 +01:00
fix sign
This commit is contained in:
parent
53bd98f2b3
commit
157d6081b8
3 changed files with 39 additions and 8 deletions
|
|
@ -113,6 +113,7 @@ pub enum ExtensionResponse {
|
|||
/// A single identity in SSH_AGENT_IDENTITIES_ANSWER.
|
||||
#[derive(Debug)]
|
||||
pub struct IdentityAnswer {
|
||||
/// The public key in the SSH wire encoding.
|
||||
pub key_blob: Vec<u8>,
|
||||
pub comment: String,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// A simplified `byteorder` clone that emits client errors when the data is too short.
|
||||
/// A writer for the SSH wire format.
|
||||
pub struct Writer(Vec<u8>);
|
||||
|
||||
impl Writer {
|
||||
|
|
@ -149,7 +149,8 @@ impl Writer {
|
|||
self.raw(bytes);
|
||||
}
|
||||
|
||||
pub fn string(&mut self, data: &[u8]) {
|
||||
pub fn string(&mut self, data: impl AsRef<[u8]>) {
|
||||
let data = data.as_ref();
|
||||
self.u32(data.len() as u32);
|
||||
self.raw(data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue