Skip to content
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

Use sha512 instead of md5 #74

Merged
merged 4 commits into from
Sep 22, 2016
Merged

Use sha512 instead of md5 #74

merged 4 commits into from
Sep 22, 2016

Conversation

Telokis
Copy link
Contributor

@Telokis Telokis commented Sep 22, 2016

Should fix #61 for every library that was pushed at the moment of the fork.

@msftclas
Copy link

Hi @Ninetainedo, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@Telokis
Copy link
Contributor Author

Telokis commented Sep 22, 2016

Every portfile currently available on master is updated to use SHA512 instead of MD5.
I didn't check the SHA512 from the website, I generated all of them using CMake's FILE command.

Copy link
Contributor Author

@Telokis Telokis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes not directly regarding hashing

cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "" ${ARGN})

if(EXISTS ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
message(STATUS "Using cached ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}")
file(MD5 ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} FILE_HASH)
if(NOT FILE_HASH MATCHES ${vcpkg_download_distfile_MD5})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this because it failed when vcpkg_download_distfile_MD5 was empty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

message(FATAL_ERROR
"File does not have expected hash: ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}\n"
" ${FILE_HASH} <> ${vcpkg_download_distfile_MD5}\n"
" '${FILE_HASH}' <> '${vcpkg_download_distfile_SHA512}'\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those quotes allow the user to see empty strings in an easier way.

@alexkaratarakis alexkaratarakis merged commit 257e134 into microsoft:master Sep 22, 2016
@alexkaratarakis
Copy link
Contributor

Looks great! Thanks!

@Telokis Telokis deleted the Use-SHA512-instead-of-MD5 branch September 22, 2016 20:58
JoergAtGithub added a commit to JoergAtGithub/vcpkg that referenced this pull request Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to SHA-512
3 participants