My application is .NET based. I have signed xml from third-party environment (Java based).
Its signature value base64 string contains carriage return #xd;.


According to
Canonical XML Version 1.1: Line breaks normalized to #xA on input, before parsing
Extensible Markup Language (XML) 1.0: End-of-Line Handling I should remove carriage returns from XML before making any actions with its nodes.

I need to calculate SignatureValue element hash in order to add\verify Signature timestamp. I can`t find any information how to handle carriage returns in XAdES elements values.

If I decide to remove carriage return from base64 before calculating element hash, third-party application can leave it and calculate hash with carriage return in order to verify my hash and vice versa .
In these cases hashes won`t match.

I also need some levers how to stand my position in such confrontation with third party system.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.