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=43239>.
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=43239

           Summary: "No installed provider supports this key" when checking
                    a RSA signature against a DSA key before RSA key
           Product: Security
           Version: Java 1.4.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Signature
        AssignedTo: security-dev@xml.apache.org
        ReportedBy: [EMAIL PROTECTED]


When i try to check a XML signature wich was created with a RSA private key
against a DSA public key, i get a exception saying "Not an RSA key: DSA" as i
expect it. But when i try to validate the same signature against the correct RSA
public key afterwards, i get the following exception:

java.security.InvalidKeyException: No installed provider supports this key:
sun.security.rsa.RSAPublicKeyImpl
        at java.security.Signature$Delegate.chooseProvider(Signature.java:1059)
        at 
java.security.Signature$Delegate.engineInitVerify(Signature.java:1091)
        at java.security.Signature.initVerify(Signature.java:426)
        at
org.apache.xml.security.algorithms.implementations.SignatureBaseRSA.engineInitVerify(Unknown
Source)
        at 
org.apache.xml.security.algorithms.SignatureAlgorithm.initVerify(Unknown Source)
        at 
org.apache.xml.security.signature.XMLSignature.checkSignatureValue(Unknown
Source)
        at test.Test.validate(Test.java:54)
        at test.Test.test(Test.java:37)
        at test.Test.main(Test.java:22)

But when i do not try the DSA key first (just the correct RSA key), everything
works fine. 

As a very strange fact, everything does also work fine (DSA first, then RSA) if
i set the log priority for the "org.apache.xml.security.signature.XMLSignature"
class to DEBUG in the log4j configuration.

-- 
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.

Reply via email to