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: Fri, 20 Feb 2009 04:59:33 -0500 (EST)

That's my first mail using this mailing list, sorry I didn't reply to your
mail to the whole list.
Yes I sign the XMLObject.
Here is the code used to marshall and sign :

MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory();
Marshaller marshaller =
marshallerFactory.getMarshaller(samlObject);
Element samlObjectElement = marshaller.marshall(samlObject);
/** Signature */
Signer.signObject(signature);



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);
}

And the one that get the bytes from the outputstream:
/** Sérialisation en tableau de bytes*/
ByteArrayOutputStream bos = null;
try {
bos = new ByteArrayOutputStream();
serialize(marshalledMessage, bos);
} catch (IOException e) {
logError(getMessage(Constants.ERROR_SAML_IO), e);
throw e;
}


Do you see anything wrong?



Archive powered by MHonArc 2.6.16.

Top of Page