lib/sign-dummy: Handle incorrect signatures correctly

We need to check all signatures for one which passes, not just fail on
the first one.

Reported-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
Jonathan Lebon committed 2021-08-03 16:49:49 -04:00
1 parent a3ce5df22e
commit 75b17937cf
2 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -169,6 +169,6 @@ ostree_repo_init repo2 --mode=bare-user
${CMD_PREFIX} ostree --repo=repo2 pull-local repo ${origrev}
${CMD_PREFIX} ostree --repo=repo2 ls ${origrev} >/dev/null
${CMD_PREFIX} ostree --repo=repo2 static-delta apply-offline --sign-type=dummy repo/deltas/${deltaprefix}/${deltadir} badsign 2> apply-offline-bad-key.txt && exit 1
assert_file_has_content apply-offline-bad-key.txt "signature: dummy: incorrect signature"
assert_file_has_content apply-offline-bad-key.txt "signature: dummy: incorrect signatures found: 1"
echo 'ok apply offline failed with dummy and bad key'