Skip to content

Commit

Permalink
Use SHA2 instead of SHA1
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Apr 6, 2018
1 parent 27bfdb9 commit b5df5f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/packages/src/lib/y2packager/license.rb
Expand Up @@ -110,7 +110,7 @@ def id
return @id if @id
content = content_for(DEFAULT_LANG)
return unless content
@id = Digest::SHA1.hexdigest(content)
@id = Digest::SHA2.hexdigest(content)
end

# Return the license translated content for the given language
Expand Down
2 changes: 1 addition & 1 deletion library/packages/test/y2packager/license_test.rb
Expand Up @@ -72,7 +72,7 @@
end

it "returns the license unique identifier" do
expect(license.id).to eq("040f06fd774092478d450774f5ba30c5da78acc8")
expect(license.id).to eq("ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73")
end

context "when the license is not found" do
Expand Down
2 changes: 1 addition & 1 deletion package/yast2.changes
@@ -1,7 +1,7 @@
-------------------------------------------------------------------
Thu Apr 5 17:38:35 UTC 2018 - igonzalezsosa@suse.com

- Use SHA1 instead of MD5 when determining whether a license
- Use SHA2 instead of MD5 when determining whether a license
was already accepted or not (related to fate#325461).
- 4.0.64

Expand Down

0 comments on commit b5df5f9

Please sign in to comment.