This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Use javax.net.ssl.SSLEngine for NIO - Invalid key exception
- From: Jary Grove <jarygrove at yahoo dot com>
- To: Andrew Haley <aph at redhat dot com>, Casey Marshall <casey dot s dot marshall at gmail dot com>
- Cc: David Daney <ddaney at avtrex dot com>, java at gcc dot gnu dot org
- Date: Sun, 23 Dec 2007 11:51:33 -0800 (PST)
- Subject: Use javax.net.ssl.SSLEngine for NIO - Invalid key exception
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