.NET XML

Moderators: None (Apply to moderate this forum)
Number of threads: 16
Number of posts: 18

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
rsa-sha1 signature in .NET XML Posted by mattik_ on 26 Jun 2009 at 2:19 AM
Hello, I try to create the signature element like this:

<KeyInfo>
  <X509Data>
   <X509Certificate>
   </X509Certificate>
  </X509Data>
  <X509IssuerSerial>
    <X509IssuerName>
      <X509IssuerName>
      </X509IssuerName>
      <X509SerialNumber>
      </X509SerialNumber>
    </X509IssuerName>
  </X509IssuerSerial>
</KeyInfo>


But when I create code

KeyInfo ki = new KeyInfo();
KeyInfoX509Data keyInfoData = new KeyInfoX509Data(cert);
keyInfoData.AddIssuerSerial(cert.Issuer, cert.GetSerialNumberString());
ki.AddClause(keyInfoData);


I can't get it same kind.

Format is:

<KeyInfo>
  <X509Data>
    <X509IssuerSerial>
      <X509IssuerName></X509IssuerName>
      <X509SerialNumber></X509SerialNumber>
    </X509IssuerSerial>
    <X509Certificate>
    </X509Certificate>
  </X509Data>
</KeyInfo>



If I create the second X509Data-tag, I have two different X509-tags then which first have certificate and second have issuerserial.

How can I exclude X509IssuerSerial-tag from X509Data-tag?

Thank you



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.