[xmlsec] C14N break line problem (Windows)

Aleksey Sanin aleksey at aleksey.com
Fri Sep 27 14:54:46 PDT 2013


http://www.w3.org/TR/xml-c14n#Terminology

"Line breaks normalized to #xA on input, before parsing"

Which is exactly what is happening

file.xml
<?xml version="1.0"?>CR LF

result.xml
<carro id="carro101">LF

Best,

Aleksey

On 9/27/13 2:41 PM, Alexwell Sandro wrote:
> Hi, I am using [1] xmlSecTransformCtxXmlExecute to canonicalize a
> xmlSecNodeSet with exclc14n "xmlSecTransformExclC14NId".
> 
> *The file (file.xml):*
> <?xml version="1.0"?>
> <catalog>
>    <carro id="carro101">
>       <author>Alex Sandro</author>
>       <name>Ferrari</name>
>       <price>44.95</price>
>       <publish_date>2099-05-16</publish_date>
>       <description>Simple XML file.</description>
>    </carro>
> </catalog>
> 
> *After applying the transform:*
> <carro id="carro101">
>       <author>Alex Sandro</author>
>       <name>Ferrari</name>
>       <price>44.95</price>
>       <publish_date>2099-05-16</publish_date>
>       <description>Simple XML file.</description>
>    </carro>
> 
> The transform did not remove the break line.
> 
> *I did apply the transform again over 'result'*:
> <author>Alex
> Sandro</author><name>Ferrari</name><price>44.95</price><publish_date>2099-05-16</publish_date><description>Simple
> XML file.</description>
> 
> *Documents attached:*
> file.xml - file to transform
> result.xml - file after transform
> result_from_result.xml - file result.xml after transform
> 
> *Using notpad++ to show break lines (View/Show Symbol/Show End of Line)*
> _file.xml_
> <?xml version="1.0"?>CR LF
> <catalog>CR LF
> ...
> 
> _result.xml_
> <carro id="carro101">LF
>       <author>Alex Sandro</author>LF
> ...
> 
> *How to fix this problem?*
> 
> My configuration:
> Windows 7, Visual Studio 2010, xmlsec 1.2.19.
> xmlsec linked to libiconv-1.9.2, libxml2-2.9.1, libxslt-1.1.28
> 
> 
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
> 


More information about the xmlsec mailing list