santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47097] New: Reusing XMLSignature for signing and verifying fails on same thread
Date Sun, 26 Apr 2009 13:45:41 GMT

           Summary: Reusing XMLSignature for signing and verifying fails
                    on same thread
           Product: Security
           Version: Java 1.4.2
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Signature

Created an attachment (id=23543)
 --> (
Maven2 test-case

If the same instance of XMLSignature is used on the same thread for verifying
after being used for signing, this exception occurs: object not initialized
for verification 
If the verification is done on a different thread, it works fine.

I believe this is due to:

due to

    private void initializeAlgorithm(boolean isForSigning)
        throws XMLSignatureException {
        if (_signatureAlgorithm!=null) {
        _signatureAlgorithm=isForSigning ? getInstanceForSigning(algorithmURI)

If '_signatureAlgorithm' has already been initialised, even if it's not for the
purpose intended for another use, it won't be initialised again. Commenting out
the 'if' block solves the problem.

I've noticed that there was an 'isForSigning' field commented out in revision
515521 ( ), which completely disappeared
in revision 695520 ( ) (current
one). I guess
it might have been the original intent for this flag.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message