Skip to content

Commit

Permalink
Specify hash for digest check (#451)
Browse files Browse the repository at this point in the history
* Specify hash for digest check

* Fix tagging
  • Loading branch information
karthiknadig authored Sep 3, 2024
1 parent 30560bb commit 8d8281f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/azure-pipeline.pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extends:
parameters:
l10nSourcePaths: ./src
standardizedVersioning: true
ghCreateTag: false
buildPlatforms:
- name: Linux
vsceTarget: ''
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def download_url(values):
for value in values:
with url_lib.urlopen(value["url"]) as response:
data = response.read()
name, digest = next(iter(value["hash"].items()))
if hashlib.new(name, data).hexdigest() != digest:
digest = value["hash"]["sha256"]
if hashlib.new("sha256", data).hexdigest() != digest:
raise ValueError(f"Failed hash verification for {value['url']}.")

print("Download: ", value["url"])
Expand Down

0 comments on commit 8d8281f

Please sign in to comment.