我想SignedXml
根据机器商店中的证书验证签名。此代码用于验证签名:
internal bool VerifySignature(XmlDocument xml)
{
var signedXml = new SignedXml(xml);
var nsMgr = new XmlNamespaceManager(xml.NameTable);
nsMgr.AddNamespace("ds", "http://www.w3.org/2000/09/xmldsig#");
signedXml.LoadXml((XmlElement)xml.SelectSingleNode("//ds:Signature", nsMgr));
return signedXml.CheckSignature();
}
签名验证正常,但仅针对自身,而不针对机器上安装的证书。有没有办法根据本地证书存储中的根证书检查它?