deepstream.io-client-java icon indicating copy to clipboard operation
deepstream.io-client-java copied to clipboard

java client 2.2.0 BufferOverflowException if ssl cert is expired.

Open h3adache opened this issue 8 years ago • 3 comments

SSL cert was installed using the instructions from deepstream tutorials

Everything works fine but when the cert expired and client tries to connect. I get a BufferOverflowException without any other error/information and not any indication what the error was.

Exception in thread "Thread-10" java.nio.BufferOverflowException
        at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:363)
        at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:342)
        at sun.nio.ch.IOUtil.write(IOUtil.java:60)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
        at org.java_websocket.SSLSocketChannel2.close(SSLSocketChannel2.java:270)
        at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:453)
        at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:472)
        at org.java_websocket.WebSocketImpl.eot(WebSocketImpl.java:509)
        at org.java_websocket.client.WebSocketClient.interruptableRun(WebSocketClient.java:249)
        at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:188)
        at java.lang.Thread.run(Thread.java:745)

There's a possibly related issue on TooTallNate/Java-WebSocket#380

h3adache avatar Jun 27 '17 18:06 h3adache

The same problem also occurs when the certificate is not "trustworthy". I tried it with an old version of the JDK which does not trust letsencrypt yet, and got the same error.

An appropriate exception would be good here.

afiller avatar Jul 18 '17 12:07 afiller

This is fixed in TooTallNate/Java-WebSocket now https://github.com/TooTallNate/Java-WebSocket/milestone/7

h3adache avatar Sep 06 '17 13:09 h3adache

Thanks for letting us know! We'll get out a release very shortly

yasserf avatar Sep 09 '17 09:09 yasserf