Subject: Problem/Bug? in Response.Validate() after Response.Sign()
Date: 2011-02-01 21:58:24
From: Christian Heinrich
Source: problem-bug-response-validate-response-sign
----------------------------------------------------------------------

Hello all,$0
I sign a response like this:
 var response = new Response( responseXml );
  var x509Certificate2 = new X509Certificate2( x509Certificate );
  response.Sign( x509Certificate2 );  

Then I validate it:

 var valid = response.Validate( x509Certificate2 );

Now valid is true => so far, so good.
BUT, if I want to validate a new Reponse-Object created like this:
Response resp2 = new Response(response.GetXml());

   var valid2 = resp2.Validate( x509Certificate2 );

valid2 is false!!
The certificate is created from a pfx-file, which contains public and private key:
 var cert = File.ReadAllBytes("certificate.pfx");
 var x509Certificate2 = new X509Certificate2( cert );
Is this a bug?
valid2 has to be true, it is the same certificate and the same Xml.
Any ideas? $0 $0Thanks in advance! $0 Cheers,$0 Christian ---------------------------------------------------------------------- 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