Skip to content

Commit

Permalink
rework KeyConstaint decoder
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <[email protected]>
  • Loading branch information
baloo authored and wiktor-k committed Apr 5, 2024
1 parent bbd8205 commit a1c0beb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/proto/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ impl Decode for KeyConstraint {
2 => KeyConstraint::Confirm,
255 => {
let name = String::decode(reader)?;
let mut details = vec![0; reader.remaining_len()];
reader.read(&mut details)?;
let details: Vec<u8> = Vec::decode(reader)?;
KeyConstraint::Extension(name, details.into())
}
_ => return Err(Error::AlgorithmUnknown)?, // FIXME: it should be our own type
Expand Down Expand Up @@ -560,7 +559,6 @@ mod tests {
}

#[test]
#[ignore = "temporarily disable until test vectors are updated"]
fn test_add_identity_constrained() {
let msg: &[u8] = &hex!(
"
Expand Down

0 comments on commit a1c0beb

Please sign in to comment.