Subject: Why does Validate fail on an Assertion created using GetXml()?
Date: 2018-12-04 22:16:52
From: kmrsaml
Source: validate-fail-assertion-created-using-getxml
----------------------------------------------------------------------

Hi. I am using the Ultimate SAML trial period.

I have a signed and encrypted assertion in xmlDoc and the two different certificates - one for encryption (encryptionCert) and the other for signing (signingCert).

1. From the xmlDoc I can successfully create an EncryptedAssertion.
EncryptedAssertion encryptedAssertion = new EncryptedAssertion(xmlDoc.DocumentElement);

2. I can successfully Decrypt the EncryptedAssertion  to return an Assertion
Assertion assertion = encryptedAssertion.Decrypt(encryptionCert);

3. I can successfully Validate the Assertion (assertion) using the signingCert
bool validated = assertion.Decrypt(signingCert);

What I cant do is the following:
Create a new assertion using GetXml and Validate!
I use the GetXml() method on assertion and create a new Assertion (newAssertion). The Validate method returns false. I expect it to return true.
Assertion newAssertion = new Assessment(assertion.GetXml())
validated  = newAssertion.Validate(signingCert);

validated == FALSE! Any ideas?

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index