Reputation: 81342
I have an XML file that is digitally signed. Is there an easy way to remove this signature in C#?
Upvotes: 1
Views: 1815
Reputation: 73351
I am assuming it has a <Signature>
Element
You can just remove it using Linq and Resave.
// Find the <Signature> Element
XElement signElement = doc.Descendants("Signature").FirstOrDefault<XElement>();
signElement.Remove();
doc.Save("NonSignedFile.xml");
Upvotes: 3