Skip to content

Commit

Permalink
Fix signing
Browse files Browse the repository at this point in the history
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
  • Loading branch information
wiktor-k committed Mar 26, 2024
1 parent 52ca4c1 commit 3722e88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/proto/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Decode for SignRequest {
type Error = Error;

fn decode(reader: &mut impl Reader) -> Result<Self> {
let pubkey = KeyData::decode(reader)?;
let pubkey = reader.read_prefixed(KeyData::decode)?;
let data = Vec::decode(reader)?;
let flags = u32::decode(reader)?;

Expand Down Expand Up @@ -280,6 +280,7 @@ impl Encode for Message {

lengths.checked_sum()?
}
Self::SignResponse(response) => response.encoded_len()? + 4,
_ => todo!(),
};

Expand All @@ -292,6 +293,7 @@ impl Encode for Message {
Self::Success => 6,
Self::RequestIdentities => 11,
Self::IdentitiesAnswer(_) => 12,
Self::SignResponse(_) => 14,
_ => todo!(),
};

Expand All @@ -306,6 +308,9 @@ impl Encode for Message {
id.encode(writer)?;
}
}
Self::SignResponse(response) => {
response.encode_prefixed(writer)?;
}
_ => todo!(),
};

Expand Down

0 comments on commit 3722e88

Please sign in to comment.