I am trying to implement a routine for XML Digital Signature, and I am able to correcty calculate the hash of the information to be signed. However, I am facing problems with the signature itself, since I do not manage to create the real string to be signed.
Right now I have this:
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
<Reference URI="">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
<DigestValue>eDSx9uS7oB++bnG/6tGiD/l8374=</DigestValue>
</Reference>
</SignedInfo>
Using only CR instead of CRLF. No spaces for indentation (Where the post shows an space between tags, there is a CR)
Any suggestions to calculate a valid signature ?
P.D. I have changed the Canonicalization Algorithm to EXCLUSIVE and it works, but the requirement is to use INCLUSIVE.
Thanks a lot in advance.