directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject [mina] Strange issue with SSL.
Date Tue, 08 Mar 2005 09:26:22 GMT
Hi,

I merged Janne's SSL filter to MINA trunk, and it seems to be OK.  But
I encountered a really strange problem now.  Everything works OK if I
build from scratch in Eclipse, but test fails saying 'no cipher suite
in common' if I build from scratch in command line.

Here is the log:

-------- BEGIN --------
IoThreadPool-2 /127.0.0.1:33700: OPEN
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3] doHandshake()
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]  initialHandshakeStatus=NEED_UNWRAP
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3] unwrap()
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   inNetBuffer:
java.nio.DirectByteBuffer[pos=0 lim=100 cap=16665]
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   appBuffer:
java.nio.DirectByteBuffer[pos=0 lim=16384 cap=16384]
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3] Unwrap res:Status = OK
HandshakeStatus = NEED_TASK
bytesConsumed = 100 bytesProduced = 0
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   doTasks()
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]    doTask:
com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask@a1aa85
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   doTasks(): NEED_WRAP
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]  initialHandshakeStatus=NEED_TASK
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   doTasks()
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]   doTasks(): NEED_WRAP
[2005. 3. 8 오후 6:00:26] [IoThreadPool-3]  initialHandshakeStatus=NEED_WRAP
IoThreadPool-3 /127.0.0.1:33700: EXCEPTION
javax.net.ssl.SSLHandshakeException: Initial SSL handshake failed.
        at org.apache.mina.io.filter.SSLFilter.dataRead(SSLFilter.java:173)
        at org.apache.mina.util.IoHandlerFilterManager$Entry$1.dataRead(IoHandlerFilterManager.java:400)
        at org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvent(IoThreadPoolFilter.java:424)
        at org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvents(IoThreadPoolFilter.java:415)
        at org.apache.mina.io.filter.IoThreadPoolFilter$Worker.run(IoThreadPoolFilter.java:351)
Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
        at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:992)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:459)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1054)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1026)
        at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:411)
        at org.apache.mina.io.filter.SSLHandler.doHandshake(SSLHandler.java:347)
        at org.apache.mina.io.filter.SSLHandler.dataRead(SSLHandler.java:158)
        at org.apache.mina.io.filter.SSLFilter.dataRead(SSLFilter.java:164)
        ... 4 more
Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1352)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:164)
        at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.java:639)
        at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:450)
        at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:178)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
        at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:437)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Handshaker.java:930)
        at org.apache.mina.io.filter.SSLHandler.doTasks(SSLHandler.java:463)
        at org.apache.mina.io.filter.SSLHandler.unwrap(SSLHandler.java:401)
        at org.apache.mina.io.filter.SSLHandler.doHandshake(SSLHandler.java:323)
        ... 6 more
-------- END --------

BTW, Janne's code didn't exit infinite loop when this exception is
thrown, so I fixed it.

and I saw SSLHandler.unwrap() throws an exception saying 'SSLEngine
error during data read: BUFFER_OVERLOW'.  I saw this error only once
of many tests.  WDYT?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message