Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] XML signing and valdation

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] XML signing and valdation


Chronological Thread 
  • From: Brent Putman <>
  • To:
  • Subject: Re: [OpenSAML] XML signing and valdation
  • Date: Tue, 13 May 2008 20:54:20 -0400

Most likely you are corrupting the signature when you serialize it to, and/or when you read it back in from,  a file.  Any added whitespace, pretty printing, etc. will break the signature.  You might want to try the XMLHelper writeNode function.

Mattias Jonsson wrote:
Hi!
 
I'm a beginner to XML signing and I have some problem to get it work.
 
My test setup:
 
1. I have singed an Assertion and generated the XML file
2. I parse the XML file and try to validate the signature of the Assertion object
 
I get a ValidationException when I try to validate the Assertion:
 
org.opensaml.xml.validation.ValidationException: Signature did not validate against the credential's key
    at org.opensaml.xml.signature.SignatureValidator.validate(SignatureValidator.java:78)
    ....
 
Anyone that has a fully working example of the use-case?
 
SAMLObject => Sign => Generate XML file => Read XML file => Validate signature on SAMLObject
 
Regards,
Mattias



Archive powered by MHonArc 2.6.16.

Top of Page