diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-01-29 16:24:14 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-01-29 16:40:20 +0100 |
commit | ff2f7797587e6b0a4b6ef86a7d0bfdb08a5c3ffe (patch) | |
tree | 4736df897cda58c6b818d6b438b9d37723c51089 /src/import/pull-common.c | |
parent | c9b6ebef8c4ed28edc930bcb77906cee74c0cb34 (diff) | |
download | systemd-ff2f7797587e6b0a4b6ef86a7d0bfdb08a5c3ffe.tar.gz |
import: properly verify roothash_signature + verity download, too
Follow-up for 133b34f69a72dc90d4e336837d699245390c9f50 where this was
forgotten.
While we are at it, bring the parameters into the same order as we
declare them in the PullRaw/PullTar objects, i.e. match them to the
canonical order.
Diffstat (limited to 'src/import/pull-common.c')
-rw-r--r-- | src/import/pull-common.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 403a0952bc..75c5c7493e 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -490,12 +490,15 @@ finish: int pull_verify(ImportVerify verify, PullJob *main_job, - PullJob *roothash_job, - PullJob *settings_job, PullJob *checksum_job, - PullJob *signature_job) { + PullJob *signature_job, + PullJob *settings_job, + PullJob *roothash_job, + PullJob *roothash_signature_job, + PullJob *verity_job) { VerificationStyle style; + PullJob *j; int r; assert(main_job); @@ -513,17 +516,11 @@ int pull_verify(ImportVerify verify, return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Checksum is empty, cannot verify."); - r = verify_one(checksum_job, main_job); - if (r < 0) - return r; - - r = verify_one(checksum_job, roothash_job); - if (r < 0) - return r; - - r = verify_one(checksum_job, settings_job); - if (r < 0) - return r; + FOREACH_POINTER(j, main_job, settings_job, roothash_job, roothash_signature_job, verity_job) { + r = verify_one(checksum_job, j); + if (r < 0) + return r; + } if (verify == IMPORT_VERIFY_CHECKSUM) return 0; |