signing a xml document with x509 certificate

后端 未结 2 697
甜味超标
甜味超标 2021-01-02 04:46

Every time I try to send a signed XML, the web service verifier rejects it.

To sign the document I just adapted this sample code provided by Microsoft:

http:

2条回答
  •  独厮守ぢ
    2021-01-02 05:03

    How does the server know what certificate the document is signed with? You seem to not to include the cert in the signed document:

        KeyInfo keyInfo = new KeyInfo();
        KeyInfoX509Data keyInfoData = new KeyInfoX509Data( Key );
        keyInfo.AddClause( keyInfoData );
        signedXml.KeyInfo = keyInfo;
    

    If you need more details, consult my blog entry

    http://www.wiktorzychla.com/2012/12/interoperable-xml-digital-signatures-c_20.html

提交回复
热议问题