Support for SHA-512 hashes on publishing/downloads.

This commit is contained in:
Andrey Smirnov
2016-02-18 11:48:17 +03:00
parent ffafed472c
commit 77be7b9e3b
48 changed files with 208 additions and 229 deletions

View File

@@ -209,6 +209,8 @@ func (downloader *downloaderImpl) handleTask(task *downloadTask) {
err = fmt.Errorf("%s: sha1 hash mismatch %#v != %#v", task.url, actual.SHA1, task.expected.SHA1)
} else if task.expected.SHA256 != "" && actual.SHA256 != task.expected.SHA256 {
err = fmt.Errorf("%s: sha256 hash mismatch %#v != %#v", task.url, actual.SHA256, task.expected.SHA256)
} else if task.expected.SHA512 != "" && actual.SHA512 != task.expected.SHA512 {
err = fmt.Errorf("%s: sha512 hash mismatch %#v != %#v", task.url, actual.SHA512, task.expected.SHA512)
}
if err != nil {