Is it possible to use http://www.w3.org/2006/12/xml-c14n11 CanonicalizationMethod with SignedXml?
SignedXml signedXml = new SignedXml(xmlDoc);
signedXml.SignedInfo.CanonicalizationMethod = "http://www.w3.org/2006/12/xml-c14n11";
is throwing
System.Security.Cryptography.CryptographicException: Could not create the XML tr
ansformation identified by the URI http://www.w3.org/2006/12/xml-c14n11.
Thank You!
Doesn't look like it has been implemented by .NET yet.
https://msdn.microsoft.com/en-us/library/system.security.cryptography.xml.signedinfo.canonicalizationmethod(v=vs.110).aspx
You may have to make your own Transform class like this:
public class XmlDsigC14N11Transform: XmlDsigC14NTransform
{
public override void LoadInput(object obj)
{
//do something here
base.LoadInput(obj);
}
public override object GetOutput()
{
//do something here
return base.GetOutput();
}
}
And map your transform to "http://www.w3.org/2006/12/xml-c14n11".
CryptoConfig.AddAlgorithm(typeof(XmlDsigC14N11Transform), "http://www.w3.org/2006/12/xml-c14n11");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With