[xmlsec] xmlSecTmplSignatureCreate messes up call to xmlNodeDump

Erik F. Andersen ea at ascott.dk
Wed Jan 5 05:02:43 PST 2005


Hello!

I have a strange problem that I need help on.

I build a tree in code using libxml2 and xmlsec like this (pardon the Pascal syntax):
xmldoc := xmlNewDoc('1.0')
signnode := xmlSecTmplSignatureCreate(xmldoc, xmlSecTransformInclC14NId, xmlSecTransformRsaSha1Id, nil)
...

When I later extract the XML from the tree using xmlNodeDump(xmldoc, signnode), there are strange #10 inserted in the string. This would not be a real problem if it wasn't for the fact that the x509 data that is also added (using xmlSecTmplKeyInfoAddX509Data, not shown) is filled with the same #10 for every 64 characters!

This is somehow a sideeffect from xmlSecTmplSignatureCreate because if I add some random node instead using xmlNewNode there are no #10 inserted anywhere.

It doesn't matter is I sign the node or not.

Is there a way to get rid of these #10 characters and still have a valid signature?

I use xmlsec 1.2.6 and libxml2 2.6.14 for Win32 (under WinXP).

Thanks,
Erik F. Andersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20050105/7628a35b/attachment-0002.htm


More information about the xmlsec mailing list