From 95e8b1be902cce3b5a394066a62e0c32d0688261 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 15 Sep 2022 12:17:07 -0500 Subject: Add more burn E2E tests. Fix bug where first splash screen wasn't closed. Fix bug where billboard only started the first time. Fix bug where the restart status was lost when the exit code was an error. Fix bug where the hash byte array length was compared to the hash string length (string is twice as long). Fix bug where Burn didn't give update hash if the first byte was 0. --- src/burn/engine/detect.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/burn/engine/detect.cpp') diff --git a/src/burn/engine/detect.cpp b/src/burn/engine/detect.cpp index fcd1c966..f573e259 100644 --- a/src/burn/engine/detect.cpp +++ b/src/burn/engine/detect.cpp @@ -399,18 +399,23 @@ static HRESULT DetectAtomFeedUpdate( { APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i]; APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures; + LPCWSTR wzHash = L""; + BOOTSTRAPPER_UPDATE_HASH_TYPE hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE; - if (pEnclosure && pEnclosure->rgbDigest && *pEnclosure->rgbDigest) + if (pEnclosure && pEnclosure->rgbDigest && APUP_HASH_ALGORITHM_SHA512 == pEnclosure->digestAlgorithm) { hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash); ExitOnFailure(hr, "Failed to encode hash as string."); + + wzHash = sczHash; + hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512; } hr = UserExperienceOnDetectUpdate(pUX, pEnclosure ? pEnclosure->wzUrl : NULL, pEnclosure ? pEnclosure->dw64Size : 0, - sczHash ? sczHash : L"", - pEnclosure ? pEnclosure->digestAlgorithm == APUP_HASH_ALGORITHM_SHA512 ? BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, + wzHash, + hashType, pAppUpdateEntry->pVersion, pAppUpdateEntry->wzTitle, pAppUpdateEntry->wzSummary, -- cgit v1.2.3-55-g6feb