summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2021-01-10 15:06:04 +0000
committerLennart Poettering <lennart@poettering.net>2021-01-10 21:57:38 +0100
commit90f989861e1f7fd4465a8dddd1721b54ecb3f273 (patch)
treef0dedc1702ddcfc82772941c6752116a1eb79f48
parent91737e14539acf678d0f61ad23ac5bff2c8bb318 (diff)
downloadsystemd-90f989861e1f7fd4465a8dddd1721b54ecb3f273.tar.gz
dissect: fix root hash signature autodiscovery
The root hash signature is auto discovered only if the root hash was specified manually. Ensure that an auto discovered root hash is also enough.
-rw-r--r--src/shared/dissect-image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index bfde5cd5a0..f2634139f7 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -2123,7 +2123,7 @@ int verity_settings_load(
}
}
- if (verity->root_hash && !verity->root_hash_sig) {
+ if ((root_hash || verity->root_hash) && !verity->root_hash_sig) {
if (root_hash_sig_path) {
r = read_full_file(root_hash_sig_path, (char**) &root_hash_sig, &root_hash_sig_size);
if (r < 0 && r != -ENOENT)