You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Matteo Artuso <ma...@unimaticaspa.it> on 2002/12/04 18:15:10 UTC
problem when checkSignatureValue fail
Hi,
when I try to validate dom with lot of signature's nodes, if there are more then 2 signature wrong, main program stop his processing with an OutOfMemoryError.
Anyone can tell me something about this?
M@
----------------------------------------------------------------------------
Ing. Matteo Artuso
Unimatica SpA
e-mail martuso@unimaticaspa.it
tel. 051 7790331
centralino 051 7790311
fax 051 7790350
----------------------------------------------------------------------------
RE: problem when checkSignatureValue fail
Posted by Christian Geuer-Pollmann <ge...@nue.et-inf.uni-siegen.de>.
--On Donnerstag, 5. Dezember 2002 12:40 +0100 Matteo Artuso
<ma...@unimaticaspa.it> wrote:
> I tried some tests, but rusults are the same.
> In particular I defined XMLSignature object outside verifing cicle and set
> nul after every verification, invoke garbage collector, or redifine object
> everytime in cicle always invoking garbage collector.
> I verified that version 1.0.3 of your software (in verify side) is more
> efficient that last versions (1.0.4 and 1.0.5D2)
> To call method checkSignatureValue in the last 2 version I need to extend
> JVM heap maximum size.
> The problem is limited at:
>
> this.getSignedInfo()
> .verify(this._followManifestsDuringValidation)
> instruction.
> Delete it I haven't problem.
>
> Follow it I found it calls a lot of XpathAPI and CachedXpathAPI in
> IdResolver class.
> Reading about CachedXpathAPI object I found it fills up heap memory.
> You use IdResolver static methed getElementById(doc, id) (in
> ResolverFragment class) that calls other differents static method.
> Garbage collector can't destroy object with static dependence.
> May be is It the problem?
I haven't checked this out, but this is a good suggestion. Unfortunately, I
have to queue researching this problem for some later point in time (if no
one has already a solution).
Erwin, do you have time to check this out?
Anyway, thanks for the hint,
Christian
RE: problem when checkSignatureValue fail
Posted by Matteo Artuso <ma...@unimaticaspa.it>.
I tried some tests, but rusults are the same.
In particular I defined XMLSignature object outside verifing cicle and set
nul after every verification, invoke garbage collector, or redifine object
everytime in cicle always invoking garbage collector.
I verified that version 1.0.3 of your software (in verify side) is more
efficient that last versions (1.0.4 and 1.0.5D2)
To call method checkSignatureValue in the last 2 version I need to extend
JVM heap maximum size.
The problem is limited at:
this.getSignedInfo()
.verify(this._followManifestsDuringValidation)
instruction.
Delete it I haven't problem.
Follow it I found it calls a lot of XpathAPI and CachedXpathAPI in
IdResolver class.
Reading about CachedXpathAPI object I found it fills up heap memory.
You use IdResolver static methed getElementById(doc, id) (in
ResolverFragment class) that calls other differents static method.
Garbage collector can't destroy object with static dependence.
May be is It the problem?
Matteo
> -----Original Message-----
> From: Christian Geuer-Pollmann
> [mailto:geuer-pollmann@nue.et-inf.uni-siegen.de]
> Sent: Wednesday, 04 December, 2002 21:45
> To: Matteo Artuso; security-dev@xml.apache.org
> Cc: Christian Geuer-Pollmann
> Subject: Re: problem when checkSignatureValue fail
>
>
>
>
> --On Mittwoch, 4. Dezember 2002 18:15 +0100 Matteo Artuso
> <ma...@unimaticaspa.it> wrote:
>
> > when I try to validate dom with lot of signature's nodes, if there
> > are more then 2 signature wrong, main program stop his
> processing with an
> > OutOfMemoryError. Anyone can tell me something about this?
>
> The XMLSignature objects do cache the verified contents as byte[] arrays.
> If you set the XMLSignature objects to null, does the problem still exist?
>
> Christian
>
Re: problem when checkSignatureValue fail
Posted by Christian Geuer-Pollmann <ge...@nue.et-inf.uni-siegen.de>.
--On Mittwoch, 4. Dezember 2002 18:15 +0100 Matteo Artuso
<ma...@unimaticaspa.it> wrote:
> when I try to validate dom with lot of signature's nodes, if there
> are more then 2 signature wrong, main program stop his processing with an
> OutOfMemoryError. Anyone can tell me something about this?
The XMLSignature objects do cache the verified contents as byte[] arrays.
If you set the XMLSignature objects to null, does the problem still exist?
Christian