Skip to Content.
Sympa Menu

mace-opensaml-users - Re: Re: [OpenSAML] SAMLSignedObject.verify() failed to validate signaturevalue

Subject: OpenSAML user discussion

List archive

Re: Re: [OpenSAML] SAMLSignedObject.verify() failed to validate signaturevalue


Chronological Thread 
  • From:
  • To:
  • Subject: Re: Re: [OpenSAML] SAMLSignedObject.verify() failed to validate signaturevalue
  • Date: Sun, 1 Mar 2009 14:40:19 -0500 (EST)

I had a similar problem having my service provider validate my signature, and
it did turn out to be an issue with serialization, as you suggested.
Specifically, I had indentation turned on in my transformer. Below is the
code that marshalls and transforms the XML objects into a string value with
the offending line commented out:

static String xmlObjectToString(XMLObject xmlObject) throws Exception{
MarshallerFactory marshallerFactory =
Configuration.getMarshallerFactory();
Marshaller marshaller = marshallerFactory.getMarshaller(xmlObject);
Element samlObjectElement = marshaller.marshall(xmlObject);
Transformer transformer =
TransformerFactory.newInstance().newTransformer();
//transformer.setOutputProperty(OutputKeys.INDENT, "yes");
StreamResult result = new StreamResult(new StringWriter());
DOMSource source = new DOMSource(samlObjectElement);
transformer.transform(source, result);
return result.getWriter().toString();
}


  • Re: Re: [OpenSAML] SAMLSignedObject.verify() failed to validate signaturevalue, altaiojok, 03/01/2009

Archive powered by MHonArc 2.6.16.

Top of Page