Lines Matching refs:kernel
41 kernel: &[u8], in assert_payload_verification_with_initrd_fails()
46 assert_payload_verification_fails(kernel, Some(initrd), trusted_public_key, expected_error) in assert_payload_verification_with_initrd_fails()
50 kernel: &[u8], in assert_payload_verification_fails()
55 assert_eq!(expected_error, verify_payload(kernel, initrd, trusted_public_key).unwrap_err()); in assert_payload_verification_fails()
75 pub fn extract_avb_footer(kernel: &[u8]) -> Result<AvbFooter> { in extract_avb_footer()
76 let footer_start = kernel.len() - size_of::<AvbFooter>(); in extract_avb_footer()
79 transmute::<[u8; size_of::<AvbFooter>()], AvbFooter>(kernel[footer_start..].try_into()?) in extract_avb_footer()
88 pub fn extract_vbmeta_header(kernel: &[u8], footer: &AvbFooter) -> Result<AvbVBMetaImageHeader> { in extract_vbmeta_header()
91 let vbmeta_src = &kernel[vbmeta_offset..(vbmeta_offset + vbmeta_size)]; in extract_vbmeta_header()
108 let kernel = load_latest_signed_kernel()?; in assert_latest_payload_verification_passes() localVariable
109 let verified_boot_data = verify_payload(&kernel, Some(initrd), &public_key) in assert_latest_payload_verification_passes()
112 let footer = extract_avb_footer(&kernel)?; in assert_latest_payload_verification_passes()
114 hash(&[&hash(&[b"bootloader"]), &kernel[..usize::try_from(footer.original_image_size)?]]); in assert_latest_payload_verification_passes()