-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Activate GPG verification upon install #8749
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
286bf59
Do not abort on failed GPG check
9ed79a4
Style nits in Hbc::GpgCheck
7f11584
Expose more fields in Hbc::GpgCheck
cc7e2d3
Fix caching of gpg signatures
1d7fdc7
Wrap GPG key import failure with CaskError
a6addcd
Add exception for failed GPG verification
4007870
Do not purge files upon failed GPG verification
6516be1
Add Hbc::Verify.gpg_signature
35fa34d
Add test helpers for local support path
3f6a085
Load gpg signature, key_url as Hbc::URLs
c7c0ff1
Add gpg tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cask :v1test => 'bad-gpg-signature' do | ||
version '2.1.1_tampered' | ||
sha256 '2be45cd67fc081b9e9cdbcc5b43a74a010ae2ae0a8ee9efdf7295e7a1e144143' | ||
|
||
url TestHelper.local_binary_url('gnupg-2.1.1_tampered.tar.bz2') | ||
homepage 'http://example.com/bad-gpg-ignature' | ||
gpg TestHelper.local_support_url('gnupg-2.1.1.tar.bz2.sig'), | ||
:key_id => 'd8692123c4065dea5e0f3ab5249b39d24f25e3b6' | ||
|
||
stage_only true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cask :v1test => 'good-gpg-signature' do | ||
version '2.1.1' | ||
sha256 '70ecd01d2875db62624c911c2fd815742f50aef5492698eb3bfc09a08690ce49' | ||
|
||
url TestHelper.local_binary_url('gnupg-2.1.1.tar.bz2') | ||
homepage 'http://example.com/good-gpg-signature' | ||
gpg TestHelper.local_support_url('gnupg-2.1.1.tar.bz2.sig'), | ||
:key_id => 'd8692123c4065dea5e0f3ab5249b39d24f25e3b6' | ||
|
||
stage_only true | ||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this assume the signature is always in the signature.asc file? This may not always be the case—and actually isn't for a lot of software. The creators may have a signature with a different name, or (as is most common) may have clearsigned the sha256 hashes of all the executables they serve for their project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that is merely the path to our local copy of the signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, sorry for not researching better what that was :)