Skip to Content.
Sympa Menu

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

Subject: OpenSAML user discussion

List archive

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


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: [OpenSAML] SAMLSignedObject.verify() failed to validate signaturevalue
  • Date: Fri, 20 Feb 2009 11:03:15 +0100
  • Openpgp:
  • Organization: SWITCH




wrote:
> Here is the code used to serialize :
> private void serialize(Element element, OutputStream out) throws
> IOException{
> OutputFormat format = new OutputFormat();
> format.setIndenting(true);
> format.setIndent(4);
> XMLSerializer serializer = new XMLSerializer(out, format);
> serializer.serialize(element);
> }

This is the problem, you've just destroyed the XML signature here. XML
signatures are whitespace dependent, pretty printing them destroys them.
I would recommend you use the org.opensaml.xml.util.XMLHelper#writeNode
method


--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
,
http://www.switch.ch




Archive powered by MHonArc 2.6.16.

Top of Page