summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager/0001-IBS-Sort-images-list-to-verify-full-image-correctly.patch
blob: 257a604d74205f6ac73ba9e0257ce5c390a6c4c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From d7aeac195462d075e3d598010394e19945284ec8 Mon Sep 17 00:00:00 2001
From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU>
Date: Fri, 5 Aug 2022 02:56:05 +0300
Subject: [PATCH] IBS: Sort images list to verify full image correctly

---
 image_verify.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/image_verify.cpp b/image_verify.cpp
index 098ad9d..e8ca62d 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -102,6 +102,9 @@ bool Signature::verifyFullImage()
         fs::path(imageDirPath) / "MANIFEST.sig",
         fs::path(imageDirPath) / "publickey.sig"};
 
+    // Sort items like make_signatures() in image_types_phosphor.bbclass
+    sort(fullImages.begin(), fullImages.end());
+
     // Merge files
     std::string tmpFullFile = "/tmp/image-full";
     utils::mergeFiles(fullImages, tmpFullFile);
-- 
2.35.1