From 90f989861e1f7fd4465a8dddd1721b54ecb3f273 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 10 Jan 2021 15:06:04 +0000 Subject: [PATCH] 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. --- src/shared/dissect-image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index bfde5cd5a01..f2634139f76 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)