Skip to content

Commit a1c0beb

Browse files
baloowiktor-k
authored andcommitted
rework KeyConstaint decoder
Signed-off-by: Arthur Gautier <[email protected]>
1 parent bbd8205 commit a1c0beb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/proto/message.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ impl Decode for KeyConstraint {
239239
2 => KeyConstraint::Confirm,
240240
255 => {
241241
let name = String::decode(reader)?;
242-
let mut details = vec![0; reader.remaining_len()];
243-
reader.read(&mut details)?;
242+
let details: Vec<u8> = Vec::decode(reader)?;
244243
KeyConstraint::Extension(name, details.into())
245244
}
246245
_ => return Err(Error::AlgorithmUnknown)?, // FIXME: it should be our own type
@@ -560,7 +559,6 @@ mod tests {
560559
}
561560

562561
#[test]
563-
#[ignore = "temporarily disable until test vectors are updated"]
564562
fn test_add_identity_constrained() {
565563
let msg: &[u8] = &hex!(
566564
"

0 commit comments

Comments
 (0)