EldoS | Feel safer!

Software components for data protection, secure storage and transfer

About signing an XML

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
Posted: 02/23/2010 15:53:22
by Michael van Heusden (Standard support level)
Joined: 02/23/2010
Posts: 10

Bogatskyy wrote:
I think you have a problem with whitespace characters (especially with CRLF), because you are using TStringStream (it may reconvert a file using system default encoding).
Please, also ensure that you load a document (before signing) with XMLDocument.LoadFromStream(Stream, '', True), the third parameter enables normalization of newline characters (removes CR character), because most of webservices ignore CR character on canonicalization or canonicalize it incorrectly.
Then obtain a string value using OuterXML property.

That did the trick! That third parameter about the carriege returns.
The webservice does now accept my signature, and says it is valid :)

Thank you for pointing out the mistake! Now the upcoming deadline is safe ;)



Topic viewed 4749 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!