u-boot/test/py/tests/test_efi_secboot/forge_image.sh
AKASHI Takahiro 8fb9dbdea7 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>
2022-07-05 14:37:16 +02:00

5 lines
141 B
Bash

# 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