onelogin/ruby-saml — Issue #25: XMLSecurity::SignedDocument.validate not recognizing X509Certificate text
Author: danwoolley
Created: 2011-12-08 19:35:19+00:00
State: open

I had this problem with two different providers. In def validate:

base64_cert = self.elements["//ds:X509Certificate"].text

returned an error because the ds:X509Certificate node was nil.

I changed it to

base64_cert = REXML::XPath.first(self, "//ds:X509Certificate", {"ds"=>DSIG}).text

and it was able to find the node and return the proper text.