You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Peter Lin <pe...@gmail.com> on 2010/03/08 06:34:32 UTC

get canonicalized xml hash

Hi everyone,

I need to obtain a canonicalized xml hash from a DOMNode with
xml-security-c. Is there way to achieve it?

thanks

Peter Lin

[ANN]VTD-XML 2.10

Posted by jimmy Zhang <jz...@ximpleware.com>.
VTD-XML 2.10 is now released. It can be downloaded at
https://sourceforge.net/projects/vtd-xml/files/vtd-xml/ximpleware_2.10/.
This release includes a number of new features and enhancement.

* The core API of VTD-XML has been expanded. Users can now perform
cut/paste/insert on an empty element.
* This release also adds the support of deeper location cache support for
parsing and indexing. This feature is useful for application performance
tuning for
processing various XML documents.
* The java version also added support for processing zip and gzip files.
Direct processing of httpURL based XML is enhanced.
* Extended Java version now support Iso-8859-10~16 encoding.
* A full featured C++ port is released.
* C version of VTD-XML now make use of thread local storage to achieve
thread safety for multi-threaded application.
* There are also a number of bugs fixed. Special thanks to Jozef Aerts, John
Sillers, Chris Tornau and a number of other users for input and suggestions


Re: get canonicalized xml hash

Posted by Peter Lin <pe...@gmail.com>.
Yes, I know the hash will be calculated when generating a signature. 
However, it will be troublesome since at least a private key and a 
certificate will be needed. ( I tried to use RSA_NONE when calling 
createBlankSignature, but I've got No signing algorithm exception 
afterwards).

Actually there's a API class XSECC14n20010315 can do the 
canonicalization job, which is just not well documented. I found a 
sample binary "c14n" in xml-security-c source code and it's actually 
very easy. Now I've got correct result.

Thank you all.

On 03/08/2010 11:31 PM, Scott Cantor wrote:
>> I need to obtain a canonicalized xml hash from a DOMNode with
>>      
> xml-security-
>    
>> c. Is there way to achieve it?
>>      
> I don't know what you mean by that exactly, but the library can canonicalize
> a DOM node and it can produce a hash internally when it's generating a
> signature, but you'd have to mess around with the internal APIs to get it to
> generate a hash explicitly I believe.
>
> -- Scott
>
>
>    

RE: get canonicalized xml hash

Posted by Scott Cantor <ca...@osu.edu>.
> I need to obtain a canonicalized xml hash from a DOMNode with
xml-security-
> c. Is there way to achieve it?

I don't know what you mean by that exactly, but the library can canonicalize
a DOM node and it can produce a hash internally when it's generating a
signature, but you'd have to mess around with the internal APIs to get it to
generate a hash explicitly I believe.

-- Scott