Static layout: support image verification

Add support of image verification for static layout PNOR code update.

Tested: Verify the PNOR code update succeeds with valid-signed PNOR;
        and fails with invalid-signed PNOR or a PNOR tarball without
        signature.

Change-Id: I1aafeb4e8e07eaa16c170f33f4f21940f7c9c146
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/image_verify.cpp b/image_verify.cpp
index 4ad22d1..4fb2d9c 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -31,9 +31,10 @@
 constexpr auto hashFunctionTag = "HashType";
 
 Signature::Signature(const fs::path& imageDirPath,
+                     const std::string& pnorFileName,
                      const fs::path& signedConfPath) :
     imageDirPath(imageDirPath),
-    signedConfPath(signedConfPath)
+    pnorFileName(pnorFileName), signedConfPath(signedConfPath)
 {
     fs::path file(imageDirPath / MANIFEST_FILE);
 
@@ -103,7 +104,7 @@
         // Validate the PNOR image file.
         // Build Image File name
         fs::path file(imageDirPath);
-        file /= squashFSImage;
+        file /= pnorFileName;
 
         // Build Signature File name
         std::string fileName = file.filename();
@@ -115,7 +116,7 @@
         if (valid == false)
         {
             log<level::ERR>("Image file Signature Validation failed",
-                            entry("IMAGE=%s", squashFSImage));
+                            entry("IMAGE=%s", pnorFileName.c_str()));
             return false;
         }