Skip to content

Commit 3722e88

Browse files
committed
Fix signing
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
1 parent 52ca4c1 commit 3722e88

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/proto/message.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Decode for SignRequest {
4646
type Error = Error;
4747

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

@@ -280,6 +280,7 @@ impl Encode for Message {
280280

281281
lengths.checked_sum()?
282282
}
283+
Self::SignResponse(response) => response.encoded_len()? + 4,
283284
_ => todo!(),
284285
};
285286

@@ -292,6 +293,7 @@ impl Encode for Message {
292293
Self::Success => 6,
293294
Self::RequestIdentities => 11,
294295
Self::IdentitiesAnswer(_) => 12,
296+
Self::SignResponse(_) => 14,
295297
_ => todo!(),
296298
};
297299

@@ -306,6 +308,9 @@ impl Encode for Message {
306308
id.encode(writer)?;
307309
}
308310
}
311+
Self::SignResponse(response) => {
312+
response.encode_prefixed(writer)?;
313+
}
309314
_ => todo!(),
310315
};
311316

0 commit comments

Comments
 (0)