Skip to Content.
Sympa Menu

mace-opensaml-users - Using Digital Signatures with XML Encryption

Subject: OpenSAML user discussion

List archive

Using Digital Signatures with XML Encryption


Chronological Thread 
  • From: Deena Gurajala <>
  • To:
  • Subject: Using Digital Signatures with XML Encryption
  • Date: Fri, 11 Sep 2009 13:38:40 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HmTPGUJbGadXY+VwM9VJTABrJ4GKXT3sFFJnAIqYB/dn/vkCZmvvRrdHWN941bzIpp MKg4OdUdgbeYrgPbZxxnI1aeh8ZFAXa8qzND60P1b0f1qwFSlnfgsUVFKKUVHmSYW3lW Z2XsbUixLvxCVqTSqKRseDc9XIPZucXrTLGuA=

Hi,

Can anybody give me some direction on how to achieve Digital Signatures with XML encryption using openSAML? I am doing  in the following way.

Response response=getResponse();
Assertion assertion=getAssertion();

Signature signature=getSignature();
assertion.setSignature(signature);

EncryptedAssertion encAssertion=getEncryptedAssertion(assertion);
response.getEncryptedAssertion.add(encAssertion);

MarshallerFactory marshalFact = Configuration .getMarshallerFactory();
Marshaller marshaller = marshalFact.getMarshaller(response);
Element responseElement = marshaller.marshall(response);

 Signer.signObject(signature);

This is Successful. I am able to generate the encrypted assertion as above. On the other end I am able decrypt the assertion.

After decrypting the assertion, I am trying to validate the signature. But it is not going through. I am always getting "Signature did not validate against the credential's key" Exception.

What I am doing wrong? Can some body direct me to the correct path?


  • Using Digital Signatures with XML Encryption, Deena Gurajala, 09/11/2009

Archive powered by MHonArc 2.6.16.

Top of Page