You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by bu...@apache.org on 2006/10/27 16:46:46 UTC

DO NOT REPLY [Bug 40826] - Private keys must be instance of RSAPrivate or have PKCS#8 encoding

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


sean.mullan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From sean.mullan@sun.com  2006-10-27 07:46 -------
(In reply to comment #0)
> Hello
> 
> I am having a problem. My application is an applet that generate a xml and sign
> it with PrivateKey from SmartCard. 
> 
> The first time, it works fine! however when i try to sign again (second time), i
> get this exception: 
> 
> java.security.InvalidKeyException: Private keys must be instance of
> RSAPrivate(Crt)Key or have PKCS#8 encoding

This exception indicates that you are trying to use the key that is 
stored on the smart card with a software based crypto provider. It won't work. 
See http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html#DelayedSelect
for some more information about that.

However, we need to figure out why you are getting that exception. 

> The exception occurs when calling the method: DOMSignContext dsc = new
> DOMSignContext(pk, doc.getDocumentElement()); This method is part of the
> following code:
> 
> Does any body know what could i do to solve this problem ?

Can you attach the full exception stack trace?

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