[xml] XML and canonicalization



I'm working on a project which require messages to be signed using a <Signature> tag inside the XML document. This again requires canonicalization of the xml document before signing, and I am having trouble finding utilities/code that demonstrate canonicalization.

According to the homepage of the XML C library for Gnome (libxml2), this may be supported already - the homepage says:

"Canonical XML Version 1.0: http://www.w3.org/TR/xml-c14n and the Exclusive XML Canonicalization CR draft http://www.w3.org/TR/xml-exc-c14n "

I've searched through the mailing list archives and the include files for libxml2, but I can not find anything related to canonicalization in libxml2.

I did find a perl module that claims to do canonicalization, which again is built on top of gdome. I've looked through gdome, and can not find "canonical" mentioned anywhere in the source there either.

I've also checked the expat library, and according to the docs, calling xmlwf with the -d parameter supposedly generate canonical xml output. When I test this utility, I do get a new xml document which has been reformatted (replacing my linefeeds with "&#10;" sections. The document output from xmlwf _may_ be correct according to the standard for canonicalization, but since this is the only ready-to-use example I have found it is hard to validate.

Anyway, do you know about the status on canonicalisation on the the gnome xml projects (libxml2 and gdome2), and/or have other information about where I can get actual code using any library that does canonicalization?

Yes, I know where to find the standard, but before trying to interpret and implement it myself, I was hoping some of the XML specialists had done this already.

Anyway, thanks for any hints you may have.

Marius Kjeldahl




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]