Discuss this help topic in SecureBlackbox Forum
XML: Change canonicalization method for signature
To change canonicalization method for the signature you need to use TElXMLSigner.CanonicalizationMethod property. Additionally for exclusive canonicalization method you may need to set inclusive namespace prefix list using InclusiveNamespacesPrefixList property. When validating a signature using TElXMLVerifier class you can use CanonicalizationMethod and InclusiveNamespacesPrefixList properties to read those values.
The sample code below sets exclusive canonicalization method with inclusive namespace prefix list:
C#:
TElXMLSigner Signer = new TElXMLSigner();
...
Signer.CanonicalizationMethod = SBXMLDefs.Unit.xcmExclCanon;
Signer.InclusiveNamespacesPrefixList = "soapenv ds";
Delphi:
var
Signer : TElXMLSigner;
...
Signer := TElXMLSigner.Create(nil);
Signer.CanonicalizationMethod := xcmExclCanon;
Signer.InclusiveNamespacesPrefixList := 'soapenv ds';