Skip to content

Commit

Permalink
Place an invalid value in pad1
Browse files Browse the repository at this point in the history
  • Loading branch information
scouten-adobe committed Mar 1, 2025
1 parent a26e200 commit 4019779
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cawg_identity/src/builder/identity_assertion_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ fn finalize_identity_assertion(
}

ia.pad1 = vec![0u8; assertion_size - assertion_cbor.len() - 15];
ia.pad1[0] = 1; // INVALID

assertion_cbor.clear();
ciborium::into_writer(&ia, &mut assertion_cbor)
Expand Down
2 changes: 1 addition & 1 deletion cawg_identity/src/tests/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async fn simple_case() {
dest.rewind().unwrap();

std::fs::write(
"src/tests/fixtures/validation_method/no_hard_binding.jpg",
"src/tests/fixtures/validation_method/pad1_invalid.jpg",
dest.get_ref(),
)
.unwrap();
Expand Down

0 comments on commit 4019779

Please sign in to comment.