2
我正在使用.NET Core(最新版本爲1.1。)和C#(實際上是Omnisharp)與SOAP Web服務進行客戶端通信。申請應與封裝簽名進行數字簽名,使用RSA-SHA1簽名方法,結構類似這樣結束了:Xml使用C#.NET Core進行數字簽名1.1
<soap:Envelope>
<soap:Body>
<MyRootElement>
<MyData>
...
</MyData>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#G0xcabf5080-4D">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>4j9JKFMvg6Mmfx7ERu8R3WkZTtQ=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>....</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>....</X509Certificate>
<X509IssuerSerial>
<X509IssuerName>...</X509IssuerName>
<X509SerialNumber>72672627</X509SerialNumber>
</X509IssuerSerial>
</X509Data>
</KeyInfo>
</Signature>
</MyRootElement>
</soap:Body>
</soap:Envelope>
所有文件我能找到參考使用SignedXml類,不可用於.NET核心。 有沒有人有建議或鏈接分享我如何使這個簽名(和要求規範化)沒有SignedXml類? 或者也許有一些我不知道的SignedXml的非官方版本?