This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Dec 23, 2007, at Dec 23, 11:51 AM, Jary Grove wrote:

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

What version of GCJ are you using? A fix for this was checked into classpath some time ago. It's in GCC SVN now.


If your GCJ is recent enough, you might be able to get away with just using the libjava/classpath/gnu/javax/net/ssl/provider/ ClientHandshake.java file from GCC HEAD.

Thanks.


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]