Use javax.net.ssl.SSLEngine for NIO - Invalid key exception

Jary Grove jarygrove@yahoo.com
Sun Dec 23 19:51:00 GMT 2007


I tested with the patch Casey attached to the Bug and was able to clone the Array in my environment.
I then synchronized all the Need Task threads and was able to pass through the CLONE exception, Now I am getting the 
certificate's key cannot be used for transforming data (Invalid Key exception) - Any idea? I got no exception when using the 
JDK 1.5.
--Certificate Key Exception  Invalid Key--
keystore Type is : GKR
Protocol is :TLS
Socket read Completed 1
Binding Socket
Connecting Socket
Staring Handshake in SSLSocketImpExtend Class
Engine Begine Handshake
Engine Status is:
Status is : NEED_WRAP
Need Wrap
Done wrap
Status is : NEED_UNWRAP
Need Unwrap
Socket read Completed 1
Unwrap Status:NEED_TASK
Unwrap Finished
Status is : NEED_TASK
Need Task
Checking Certificate ----
Trust Manager Verified the Certificate
The Chain length is: 2
X509 Certificate Verified
Need Task Finished
Status is : NEED_WRAP
Need Wrap
gnu.javax.net.ssl.provider.AlertException: HANDSHAKE_FAILURE: locally generated;
 FATAL
   at gnu.javax.net.ssl.provider.ClientHandshake.implHandleOutput
   at gnu.javax.net.ssl.provider.AbstractHandshake.handleOutput
   at gnu.javax.net.ssl.provider.SSLEngineImpl.wrap
   at javax.net.ssl.SSLEngine.wrap
   at com.cert.SSLSocketImplExtend.doHandshake
   at com.cert.SSLSocketImplExtend.startHandshake
   at com.cert.JXSSLSocketFactory.createSocket
   at com.novell.ldap.Connection.connect
   at com.novell.ldap.Connection.connect
   at com.novell.ldap.LDAPConnection.connect
   at com.test.AdvLdapConnection.forSSL
   at com.test.AdvLdapConnection.CreateLdapConnection
   at com.test.AdvLdapConnection$2.run
   at org.eclipse.swt.widgets.RunnableLock.run
   at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
   at org.eclipse.swt.widgets.Display.runAsyncMessages
   at org.eclipse.swt.widgets.Display.readAndDispatch
   at org.eclipse.jface.window.Window.runEventLoop
   at org.eclipse.jface.window.Window.open
Caused by: java.security.InvalidKeyException: the certificate's key cannot be us
ed for transforming data
   at javax.crypto.Cipher.init
   at javax.crypto.Cipher.init
   at gnu.javax.net.ssl.provider.ClientHandshake$RSAGen.implRun
   at gnu.javax.net.ssl.provider.DelegatedTask.run
   at org.eclipse.swt.widgets.Synchronizer.syncExec
   at org.eclipse.swt.widgets.Display.syncExec


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the Java mailing list