1
$\begingroup$

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

<SignatureValue>rNNNqGYd4sEuEyOle0sCHHBv4UVrzBcntgxSuzqm7NrRHpD8qxPu1GpxBtcUKr3bJ0YME2J9SgFA&#xd;wsfp/Vd+0g==

According to
Canonical XML Version 1.1: Line breaks normalized to #xA on input, before parsing
and
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.

$\endgroup$

0

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.