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





------- Additional Comments From [EMAIL PROTECTED]  2006-10-27 15:15 -------
(In reply to comment #3)
> (In reply to comment #2)
> > The complete stack trace:
> > 
> > AssinaturaXMLException: java.security.InvalidKeyException: Private keys 
must be 
> > instance of RSAPrivate(Crt)Key or have PKCS#8 encoding
> >     at AssinaturaXMLEnveloped.assinar(AssinaturaXMLEnveloped.java:86)
> This stack trace doesn't help. The AssinaturaXMLException is swallowing the
> stack trace of the cause: InvalidKeyException. I need to have that the stack
> trace of the InvalidKeyException to be able to help.

Ok. I think this may help:

javax.xml.crypto.dsig.XMLSignatureException: java.security.InvalidKeyException: 
Private keys must be instance of RSAPrivate(Crt)Key or have PKCS#8 encoding
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign
(DOMXMLSignature.java:370)
        at AssinaturaXMLEnveloped.assinar(AssinaturaXMLEnveloped.java:80)
        at AssinadorDigital.AssinarDados(AssinadorDigital.java:134)
        at AssinadorDigital.btnAssinar_actionPerformed
(AssinadorDigital.java:190)
        at AssinadorDigital_btnAssinar_actionAdapter.actionPerformed
(AssinadorDigital.java:202)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.InvalidKeyException: Private keys must be instance of 
RSAPrivate(Crt)Key or have PKCS#8 encoding
        at sun.security.rsa.RSAKeyFactory.translatePrivateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.engineTranslateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.toRSAKey(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at java.security.Signature$Delegate.init(Unknown Source)
        at java.security.Signature$Delegate.chooseProvider(Unknown Source)
        at java.security.Signature$Delegate.engineInitSign(Unknown Source)
        at java.security.Signature.initSign(Unknown Source)
        at org.jcp.xml.dsig.internal.dom.DOMRSASignatureMethod.sign
(DOMRSASignatureMethod.java:134)
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign
(DOMXMLSignature.java:367)
        ... 27 more
java.security.InvalidKeyException: Private keys must be instance of RSAPrivate
(Crt)Key or have PKCS#8 encoding
        at sun.security.rsa.RSAKeyFactory.translatePrivateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.engineTranslateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.toRSAKey(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at java.security.Signature$Delegate.init(Unknown Source)
        at java.security.Signature$Delegate.chooseProvider(Unknown Source)
        at java.security.Signature$Delegate.engineInitSign(Unknown Source)
        at java.security.Signature.initSign(Unknown Source)
        at org.jcp.xml.dsig.internal.dom.DOMRSASignatureMethod.sign
(DOMRSASignatureMethod.java:134)
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign
(DOMXMLSignature.java:367)
        at AssinaturaXMLEnveloped.assinar(AssinaturaXMLEnveloped.java:80)
        at AssinadorDigital.AssinarDados(AssinadorDigital.java:134)
        at AssinadorDigital.btnAssinar_actionPerformed
(AssinadorDigital.java:190)
        at AssinadorDigital_btnAssinar_actionAdapter.actionPerformed
(AssinadorDigital.java:202)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
java.security.InvalidKeyException: Private keys must be instance of RSAPrivate
(Crt)Key or have PKCS#8 encoding
        at sun.security.rsa.RSAKeyFactory.translatePrivateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.engineTranslateKey(Unknown Source)
        at sun.security.rsa.RSAKeyFactory.toRSAKey(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at sun.security.rsa.RSASignature.engineInitSign(Unknown Source)
        at java.security.Signature$Delegate.init(Unknown Source)
        at java.security.Signature$Delegate.chooseProvider(Unknown Source)
        at java.security.Signature$Delegate.engineInitSign(Unknown Source)
        at java.security.Signature.initSign(Unknown Source)
        at org.jcp.xml.dsig.internal.dom.DOMRSASignatureMethod.sign
(DOMRSASignatureMethod.java:134)
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign
(DOMXMLSignature.java:367)
        at AssinaturaXMLEnveloped.assinar(AssinaturaXMLEnveloped.java:80)
        at AssinadorDigital.AssinarDados(AssinadorDigital.java:134)
        at AssinadorDigital.btnAssinar_actionPerformed
(AssinadorDigital.java:190)
        at AssinadorDigital_btnAssinar_actionAdapter.actionPerformed
(AssinadorDigital.java:202)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
AssinaturaXMLException: java.security.InvalidKeyException: Private keys must be 
instance of RSAPrivate(Crt)Key or have PKCS#8 encoding
        at AssinaturaXMLEnveloped.assinar(AssinaturaXMLEnveloped.java:87)
        at AssinadorDigital.AssinarDados(AssinadorDigital.java:134)
        at AssinadorDigital.btnAssinar_actionPerformed
(AssinadorDigital.java:190)
        at AssinadorDigital_btnAssinar_actionAdapter.actionPerformed
(AssinadorDigital.java:202)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)



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