Commit graph

7 commits

Author SHA1 Message Date
Tobias Kohlbau
116dfa144d Add hash and signature validation
Go-self-update lacks support for checking integrity of downloaded files.
For more advanced situation it's necessary to validate the hash or
verify against public signatures. This patch adds support for
SHA2 hash and ECDSA PublicKey signature validation.
SHA2 uses file with suffix `.sha256`, whereas ECDSA uses
`.sig` file endings. See `selfupdate/validate_test.go` for examples.

Signed-off-by: Tobias Kohlbau <t.kohlbau@myopenfactory.com>
2018-11-09 11:21:21 +01:00
Fabian Ruff
41acec25c4 Do not require GITHUB_TOKEN for enterprise setups
Not sure why this was added but using no token works for our GitHub enterprise installation.
2018-04-27 17:12:36 +02:00
rhysd
8fd62fcf16 remove httpClient field of Updater instance which is not used 2018-02-06 11:57:30 +09:00
rhysd
89582ba9d1 add more test cases to check invalid GitHub Enterprise base URL 2018-01-19 18:43:29 +09:00
rhysd
d0de60fba1 enable to have enterprise base URL and upload URL 2018-01-19 17:47:21 +09:00
rhysd
d98ca18787 fix handling redirection of GitHub download asset API 2018-01-19 15:03:47 +09:00
rhysd
fd492d6b01 create Updater struct to use persistent GitHub API client also for downloading assets 2018-01-19 11:35:24 +09:00