bmc: only add verifyBlobId if data sent for image

If data was sent to the hash only, don't add verify until they've at
least opened the image blob id.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ifc03ac7090e7edbceeac414e908bc5aedb7ad1c3
diff --git a/bmc/firmware_handler.cpp b/bmc/firmware_handler.cpp
index 5f16846..855c3fa 100644
--- a/bmc/firmware_handler.cpp
+++ b/bmc/firmware_handler.cpp
@@ -642,8 +642,13 @@
             /* They are closing a data pathway (image, tarball, hash). */
             changeState(UpdateState::verificationPending);
 
-            /* Add verify blob ID now that we can expect it. */
-            addBlobId(verifyBlobId);
+            /* Add verify blob ID now that we can expect it, IIF they also wrote
+             * some data.
+             */
+            if (std::count(blobIDs.begin(), blobIDs.end(), activeImageBlobId))
+            {
+                addBlobId(verifyBlobId);
+            }
             break;
         case UpdateState::verificationPending:
             /* They haven't triggered, therefore closing is uninteresting.