mace-opensaml-users - Re: Help with signature values
Subject: OpenSAML user discussion
List archive
- From: Perry Vessels <>
- To: Perry Vessels <>
- Cc:
- Subject: Re: Help with signature values
- Date: Mon, 6 Nov 2006 11:57:28 -0500
Finally figured why it wasn't signing the signature object. Turns out the
keystore I was using had a DSA keyset and I'd used the
"setSignatureAlgorithm(XMLSignature.ALGO_ID_SIGNATURE_RSA)".
--Perry
Perry
Vessels/Gaithersb
urg/Contr/IBM@IBM
To
US
cc
10/31/2006 10:41
AM Subject
Help with signature values
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
- Re: Help with signature values, Perry Vessels, 11/06/2006
Archive powered by MHonArc 2.6.16.