Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fix DigestMethod lookup bug SAML-Toolkits#144
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Feb 5, 2018
1 parent c0b5ca4 commit 54acb75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xml_security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def validate_signature(base64_cert, soft = true)
canon_algorithm = canon_algorithm REXML::XPath.first(ref, '//ds:CanonicalizationMethod', 'ds' => DSIG)
canon_hashed_element = hashed_element.canonicalize(canon_algorithm, inclusive_namespaces)

digest_algorithm = algorithm(REXML::XPath.first(ref, "//ds:DigestMethod"))
digest_algorithm = algorithm(REXML::XPath.first(ref, "//ds:DigestMethod", 'ds' => DSIG))

hash = digest_algorithm.digest(canon_hashed_element)
digest_value = Base64.decode64(REXML::XPath.first(ref, "//ds:DigestValue", {"ds"=>DSIG}).text)
Expand Down

0 comments on commit 54acb75

Please sign in to comment.