test/py: efi_secboot: add a test for a forged signed image

In this test case, a image binary, helloworld.efi.signed, is willfully
modified to print a corrupted message while the signature itself is
unchanged.

This binary must be rejected under secure boot mode.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
AKASHI Takahiro
2022-07-05 14:48:15 +09:00
committed by Heinrich Schuchardt
parent 634f6b2fb1
commit 8fb9dbdea7
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#!/bin/sh
replace_exp="s/H\0e\0l\0l\0o\0/h\0E\0L\0L\0O\0/g"
perl -p -e ${replace_exp} < $1 > $2