From patchwork Wed Apr 29 13:26:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 238887 List-Id: U-Boot discussion From: philippe.reynes at softathome.com (Philippe Reynes) Date: Wed, 29 Apr 2020 15:26:15 +0200 Subject: [PATCH v3 0/2] test/py: vboot: fix signature check on config node Message-ID: <1588166777-9610-1-git-send-email-philippe.reynes@softathome.com> The signature check of config node is broken when used on fit with padding. We didn't see it before because this case is not covered by vboot test. When check the signature for a config nde, u-boot uses all the properties of the node referenced in the config node, except the property data. When padding is used on fit, the property data is replaced by two properties: data-offset and data-size, and u-boot uses those properties when checking the signature. To fix this signature check, we simply ignore the properties data-offset and data_size. The first commit add some vboot tests that check signature on fit with padding. The second commit fixes the signature check on config node for fit with padding. Philippe Reynes (2): test/py: vboot: add a test to check fit signature on fit with padding rsa: sig: fix config signature check for fit with padding Changelog: v3: - rebase on master v2: - fix spelling in commit message (thanks Simon) common/image-fit-sig.c | 2 +- test/py/tests/test_vboot.py | 52 ++++++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 20 deletions(-)