HighTechTalks DotNet Forums  

Bug in XML signature??? Are there users than CAN answer????

Dotnet XML microsoft.public.dotnet.xml


Discuss Bug in XML signature??? Are there users than CAN answer???? in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Hans
 
Posts: n/a

Default Bug in XML signature??? Are there users than CAN answer???? - 12-07-2007 , 05:24 AM






Hi,

I already posted two items - but no one seems to have the knowledge to help
me out...
In the mean time I found out the following:

My existing signatures are testet using

SignedXml sXml = new SignedXml(licenses);
sXml.LoadXml(signature);
RSA csp = RSA.Create();

csp.FromXmlString(context.GetSavedLicenseKey(typeo f(MyLicense),
Assembly.GetCallingAssembly()));
sXml.SigningKey = csp;
if (sXml.CheckSignature())
m_SignatureState = Signature.Valid;
else
m_SignatureState = Signature.Invalid;

When I create a new signature, mehtod CheckSignature() suddenly returns
FALSE.... I used the same code as the valid signature!!!

I need to include KeyInfo while signing and MUST change to
//sXml.SigningKey = csp;
if (sXml.CheckSignature(csp))
m_SignatureState = Signature.Valid;
else
m_SignatureState = Signature.Invalid;

in order to get it working again.

Old signatures return TRUE on
sXml.SigningKey = csp;
if (sXml.CheckSignature())
m_SignatureState = Signature.Valid;
else
m_SignatureState = Signature.Invalid;

New signatures must have KeyInfo included and return TRUE on
if (sXml.CheckSignature(csp))
m_SignatureState = Signature.Valid;
else
m_SignatureState = Signature.Invalid;

Can anybody tell me why???

Can anybody tell me how to implement a signature WITHOUT <KeyInfo> in the
XML file???

Please help me out,
Hans.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.