aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/detect.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-09-15 12:17:07 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-09-15 14:14:04 -0500
commit95e8b1be902cce3b5a394066a62e0c32d0688261 (patch)
tree955b165715e275b70033cf7cd4c956d71d365d21 /src/burn/engine/detect.cpp
parentca3bf7968865be1cb80e9d63e7cc177f92469e2f (diff)
downloadwix-95e8b1be902cce3b5a394066a62e0c32d0688261.tar.gz
wix-95e8b1be902cce3b5a394066a62e0c32d0688261.tar.bz2
wix-95e8b1be902cce3b5a394066a62e0c32d0688261.zip
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.
Diffstat (limited to 'src/burn/engine/detect.cpp')
-rw-r--r--src/burn/engine/detect.cpp11
1 files changed, 8 insertions, 3 deletions
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(
399 { 399 {
400 APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i]; 400 APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i];
401 APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures; 401 APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures;
402 LPCWSTR wzHash = L"";
403 BOOTSTRAPPER_UPDATE_HASH_TYPE hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE;
402 404
403 if (pEnclosure && pEnclosure->rgbDigest && *pEnclosure->rgbDigest) 405 if (pEnclosure && pEnclosure->rgbDigest && APUP_HASH_ALGORITHM_SHA512 == pEnclosure->digestAlgorithm)
404 { 406 {
405 hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash); 407 hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash);
406 ExitOnFailure(hr, "Failed to encode hash as string."); 408 ExitOnFailure(hr, "Failed to encode hash as string.");
409
410 wzHash = sczHash;
411 hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512;
407 } 412 }
408 413
409 hr = UserExperienceOnDetectUpdate(pUX, 414 hr = UserExperienceOnDetectUpdate(pUX,
410 pEnclosure ? pEnclosure->wzUrl : NULL, 415 pEnclosure ? pEnclosure->wzUrl : NULL,
411 pEnclosure ? pEnclosure->dw64Size : 0, 416 pEnclosure ? pEnclosure->dw64Size : 0,
412 sczHash ? sczHash : L"", 417 wzHash,
413 pEnclosure ? pEnclosure->digestAlgorithm == APUP_HASH_ALGORITHM_SHA512 ? BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, 418 hashType,
414 pAppUpdateEntry->pVersion, 419 pAppUpdateEntry->pVersion,
415 pAppUpdateEntry->wzTitle, 420 pAppUpdateEntry->wzTitle,
416 pAppUpdateEntry->wzSummary, 421 pAppUpdateEntry->wzSummary,