diff options
author | Bob Arnson <bob@firegiant.com> | 2022-09-09 21:21:55 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2022-09-12 13:33:03 -0400 |
commit | 6a45cb7687de57056532fe897a708435deec2ea3 (patch) | |
tree | a9795ac837d0475ea22d86c0d592fac7b0b6c159 /src/burn/engine/externalengine.cpp | |
parent | a1307cd4e76a89598c53cb68309358a7012db553 (diff) | |
download | wix-6a45cb7687de57056532fe897a708435deec2ea3.tar.gz wix-6a45cb7687de57056532fe897a708435deec2ea3.tar.bz2 wix-6a45cb7687de57056532fe897a708435deec2ea3.zip |
Update hashes are now hex strings.
Fixes https://github.com/wixtoolset/issues/issues/6901.
Diffstat (limited to 'src/burn/engine/externalengine.cpp')
-rw-r--r-- | src/burn/engine/externalengine.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp index 16977395..e18b9486 100644 --- a/src/burn/engine/externalengine.cpp +++ b/src/burn/engine/externalengine.cpp | |||
@@ -269,8 +269,7 @@ HRESULT ExternalEngineSetUpdate( | |||
269 | __in_z_opt LPCWSTR wzDownloadSource, | 269 | __in_z_opt LPCWSTR wzDownloadSource, |
270 | __in const DWORD64 qwSize, | 270 | __in const DWORD64 qwSize, |
271 | __in const BOOTSTRAPPER_UPDATE_HASH_TYPE hashType, | 271 | __in const BOOTSTRAPPER_UPDATE_HASH_TYPE hashType, |
272 | __in_opt const BYTE* rgbHash, | 272 | __in_opt LPCWSTR wzHash |
273 | __in const DWORD cbHash | ||
274 | ) | 273 | ) |
275 | { | 274 | { |
276 | HRESULT hr = S_OK; | 275 | HRESULT hr = S_OK; |
@@ -293,11 +292,11 @@ HRESULT ExternalEngineSetUpdate( | |||
293 | 292 | ||
294 | if (!fRemove) | 293 | if (!fRemove) |
295 | { | 294 | { |
296 | if (BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE == hashType && (0 != cbHash || rgbHash)) | 295 | if (BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE == hashType && wzHash && *wzHash) |
297 | { | 296 | { |
298 | ExitFunction1(hr = E_INVALIDARG); | 297 | ExitFunction1(hr = E_INVALIDARG); |
299 | } | 298 | } |
300 | else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (SHA512_HASH_LEN != cbHash || !rgbHash)) | 299 | else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (!wzHash || !*wzHash || SHA512_HASH_LEN != lstrlenW(wzHash))) |
301 | { | 300 | { |
302 | ExitFunction1(hr = E_INVALIDARG); | 301 | ExitFunction1(hr = E_INVALIDARG); |
303 | } | 302 | } |
@@ -335,7 +334,7 @@ HRESULT ExternalEngineSetUpdate( | |||
335 | wzLocalSource = sczFilePath; | 334 | wzLocalSource = sczFilePath; |
336 | } | 335 | } |
337 | 336 | ||
338 | hr = PseudoBundleInitializeUpdateBundle(&pEngineState->update.package, wzGuid, pEngineState->registration.sczId, sczFilePath, wzLocalSource, wzDownloadSource, qwSize, sczCommandline, rgbHash, cbHash); | 337 | hr = PseudoBundleInitializeUpdateBundle(&pEngineState->update.package, wzGuid, pEngineState->registration.sczId, sczFilePath, wzLocalSource, wzDownloadSource, qwSize, sczCommandline, wzHash); |
339 | ExitOnFailure(hr, "Failed to set update bundle."); | 338 | ExitOnFailure(hr, "Failed to set update bundle."); |
340 | 339 | ||
341 | pEngineState->update.fUpdateAvailable = TRUE; | 340 | pEngineState->update.fUpdateAvailable = TRUE; |