Skip to content

Commit

Permalink
Replace MD5 with SHA1 in License#id
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Apr 5, 2018
1 parent 98c5060 commit 53e8172
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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::SHA1.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("040f06fd774092478d450774f5ba30c5da78acc8")
end

context "when the license is not found" do
Expand Down

0 comments on commit 53e8172

Please sign in to comment.