-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sha1 checksum of zip is compared with md5 #253
Comments
I'm confused. The link you sent shows Was that after fixing it? |
Yeah, that's my workaround. If you uncomment the sha1 version and comment out the md5 version, it breaks. |
Ah sorry, glossed right over the commented stuff. |
Oh! I learned a new github link trick! (link to file with line number). Thanks! |
Might have found the issue. Was setting checksumType to the 64 bit version, which was empty. All because $url64 defaulted to $url. |
Due to defaulting `$url64bit` to `$url`, `$checksumType` was converting to the 64 bit checksumtype, even if it was empty. Which causes checksumtype to default to md5, no matter what the checksumtype passed in is. Move the checksumType setting for x64 into the check if the urls for 32 bit and 64 bit are different. Additionally, ensure that the checksumtype64 is not empty.
Ah, nice catch. |
Install-ChocolateyZipPackage fails when passing a valid sha1 checksum with checksumType set to 'sha1', but succeeds with an md5 checksum/checksumType.
The error asserts that an md5 comparison was done, even though I passed in 'sha1' as the checksumType.
Is there a test already covering this case?
See https://github.com/epu/epu-choco-pkg/blob/master/premake.portable/tools/chocolateyinstall.ps1
The text was updated successfully, but these errors were encountered: