santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36526] - Out of memory error when signing or verifying big files
Date Thu, 13 Jul 2006 16:24:28 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36526>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36526





------- Additional Comments From jdmarshall@gmail.com  2006-07-13 16:24 -------
I did find myself a nice workaround for the problem.

At issue, as I currently understand the code, is that the code in
XMLSignatureInput assumes that it is dealing with a relatively small piece of
input (true for internal references, not so for external), and further that the
transforms will/may scan the input several times (also true for internal
references, probably not so for external).

As Agnes found, the crux of the problem starts with updateOutputStream, but
extends into the retrieval of the resettable stream (which has far more side
effects than I'm comfortable with).  

For my situation, I already had a custom resolver in place.  It was simple
enough, once I had a better grasp on the problem, to create a custom
XMLSignatureInput implementation that overrides updateOutputStream to open a
FileInputStream, copy it to diOS, and close the input stream.  

I suspect a better solution than either mine or Agnes' would present itself if I
could understand exactly what's going on with some of those member variables in
XMLSignatureInput.  The code is just peculiar enough that I'm not confident that
I understand everything it's trying to accomplish.

I can observe however that XMLSignatureInput has changed somewhat since Agnes'
proposal, so some rework would be necessary to apply it.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message