Skip to content

Commit

Permalink
Merge pull request #719 from yast/md5-to-sha1
Browse files Browse the repository at this point in the history
Use SHA2 instead of MD5
  • Loading branch information
imobachgs committed Apr 6, 2018
2 parents 98c5060 + b5df5f9 commit 7a7c53d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/packages/src/lib/y2packager/license.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def id
return @id if @id
content = content_for(DEFAULT_LANG)
return unless content
@id = Digest::MD5.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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
end

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

context "when the license is not found" do
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Apr 5 17:38:35 UTC 2018 - igonzalezsosa@suse.com

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

-------------------------------------------------------------------
Thu Apr 5 12:28:12 UTC 2018 - knut.anderssen@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2
Version: 4.0.63
Version: 4.0.64
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
Expand Down

0 comments on commit 7a7c53d

Please sign in to comment.