Berin Lautenbach wrote:
<GRIN> - Yes I just checked it in.
Took me a while to find - I'm not too sure why, but the behaviour of the canoncicaliser appears to have changed.
It appears that the canonicaliser is now storing it's output. So if you re-use an instance, it will append the new canonicalisation to the old and return the complete output.
Does anyone know if this is normal behaviour?
After the memory reduction patch is the expected behavior. I was thinking on deprecated the methods that return the byte arrays(canonicalizeSubtree and alike) and enforce to be called with an OutputStream as a param.
Anyway I will take a look to your changes, perhaps I will take a look as the encryptData can be optimize somehow.
Regards,
And sorry for the time you spent in the bug hutting.
Raul
Cheers, Berin
Vishal Mahajan wrote:
Berin,
Your fix has fixed this problem of duplicate data being outputted on decryption. :-)
Thanks, Vishal
Vishal Mahajan wrote:
2) This seems to be a regression in xml-security. Using (JDK1.4.2 + BC) OR JDK1.5, the result of decryption in the sample seems incorrect. The input to be encrypted was
<apache:RootElement xmlns:apache="http://www.apache.org/ns/#app1"> <apache:foo>Some simple text</apache:foo> </apache:RootElement>
and the output after decryption is
<apache:RootElement xmlns:apache="http://www.apache.org/ns/#app1">
<apache:foo xmlns:apache="http://www.apache.org/ns/#app1">Some simple text</apache:foo>
<apache:foo xmlns:apache="http://www.apache.org/ns/#app1">Some simple text</apache:foo>
</apache:RootElement>
Vishal