hash comparison case insensitive
MODIFY
src/vcpkg/base/downloads.cpp
src/vcpkg/base/downloads.cpp
@@ -221,7 +221,7 @@ namespace vcpkg::Downloads
}
// </HACK>
- if (sha512 != actual_hash)
+ if (!Strings::case_insensitive_ascii_equals(sha512, actual_hash))
{
return format_hash_mismatch(sanitized_url, downloaded_path, sha512, actual_hash);
}

MODIFY
src/vcpkg/commands.xdownload.cpp
src/vcpkg/commands.xdownload.cpp
@@ -115,7 +115,7 @@ namespace vcpkg::Commands::X_Download
Checks::exit_with_message(VCPKG_LINE_INFO, "Error: path was not a regular file: %s", file);
}
auto actual_hash = Hash::get_file_hash(VCPKG_LINE_INFO, fs, file, Hash::Algorithm::Sha512);
- if (*hash != actual_hash)
+ if (!Strings::case_insensitive_ascii_equals(*hash, actual_hash))
{
Checks::exit_with_message(VCPKG_LINE_INFO, "Error: file to store does not match hash");
}

hash comparison case insensitive (#269)