File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ macro_rules! fuzz_target {
2+ ( |$data: ident: & [ u8 ] | $body: block) => { } ;
3+ }
4+
5+ fuzz_target ! ( |data: & [ u8 ] | {
6+
7+ if let Ok ( app_img) = AppImage :: parse( data) {
8+ if let Ok ( app_img) = app_img. sign_for_secureboot( include_str!( "../../test-data/signing-key" ) ) {
9+ assert!( app_img. is_signed( ) ) ;
10+ Gbl :: from_app_image( app_img) . to_bytes( ) ;
11+ }
12+ }
13+
14+ } ) ;
Original file line number Diff line number Diff line change 1+ macro_rules! fuzz_target {
2+ ( |$data: ident: & [ u8 ] | $body: block) => { } ;
3+ }
4+
5+ fuzz_target ! ( |data: & [ u8 ] | {
6+ if let Ok ( app_img) = AppImage :: parse( data) {
7+ if let Ok ( app_img) =
8+ app_img. sign_for_secureboot( include_str!( "../../test-data/signing-key" ) )
9+ {
10+ assert!( app_img. is_signed( ) ) ;
11+ Gbl :: from_app_image( app_img) . to_bytes( ) ;
12+ }
13+ }
14+ } ) ;
You can’t perform that action at this time.
0 commit comments