Skip to Content.
Sympa Menu

mace-opensaml-users - Help with signature values

Subject: OpenSAML user discussion

List archive

Help with signature values


Chronological Thread 
  • From: Perry Vessels <>
  • To:
  • Subject: Help with signature values
  • Date: Tue, 31 Oct 2006 10:41:30 -0500


I guess I'm missing something (understanding wise). but how do I get the
"signature" and "hash" values in my assertion. When I dump the assertion I
get:

...
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>



signature.setSigningKey(signingKey);

signature.setCanonicalizationAlgorithm(Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);

signature.setSignatureAlgorithm(XMLSignature.ALGO_ID_SIGNATURE_RSA);
signature.getContentReferences().add(new
SAMLObjectContentReference(assertion));
assertion.setSignature(signature);

// Get the marshaller factory
MarshallerFactory marshallerFactory =
Configuration.getMarshallerFactory();

Marshaller marshaller = marshallerFactory.getMarshaller(assertion);
try {
marshaller.marshall(assertion);
} catch (MarshallingException e) {
e.printStackTrace();
}
Signer.signObject(signature);

Thanks
Perry



  • Help with signature values, Perry Vessels, 10/31/2006

Archive powered by MHonArc 2.6.16.

Top of Page