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

Add file verifying to UpdateManager #9535

Merged
merged 20 commits into from
Nov 29, 2022

Conversation

Szpoti
Copy link
Collaborator

@Szpoti Szpoti commented Nov 15, 2022

Instead of #9259

This PR adds different file verifying methods to the UpdateManager with the help of WasabiSignerHelpers, introduced in #9515 .

Once, upon a new release, it verifies the provided SHA256SUMS.asc file, with the (also provided) SHA256SUMS.wasabisig.
Then, after the correct installer is downloaded, it verifies the hash of the downloaded file with the expected hash to be found in SHA256SUMS.asc.

Copy link
Collaborator

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

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

Code LGTM, is there an easy way to test this?

WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

cACK. I made some comments, and I am missing a few tests here.

WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
@Szpoti
Copy link
Collaborator Author

Szpoti commented Nov 16, 2022

is there an easy way to test this?

In the Constants.cs file, replace ClientVersion with an older one, for example 2.0.1.0.
If the auto update is turned on in the settings, this will cause the client to download the related files and the latest version.

adamPetho
adamPetho previously approved these changes Nov 16, 2022
Copy link
Collaborator

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

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

tACK 🎉

WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

This needs a little more tackling. Some methods are merging functionality needlessly.

Here is a very basic sketch of how it would look a bit more straightforward.
Notepad2

WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Show resolved Hide resolved
WalletWasabi/Services/UpdateManager.cs Outdated Show resolved Hide resolved
Szpoti and others added 5 commits November 28, 2022 13:41
Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>
@Szpoti
Copy link
Collaborator Author

Szpoti commented Nov 29, 2022

Resolved smells and refactored the code IRL, is ready.

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

tACK

@molnard molnard merged commit 426e1d4 into WalletWasabi:master Nov 29, 2022
@Szpoti Szpoti deleted the addVerifyingToUpdateManager branch November 29, 2022 14:11
kiminuo pushed a commit to kiminuo/WalletWasabi that referenced this pull request Nov 30, 2022
…Manager

Add file verifying to UpdateManager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants