0

I use example from http://books.google.com/books?id=l6f1jTB_XCYC&lpg=PA185&vq=scalable%20secure&pg=PA185#v=onepage&q&f=false to see how SSLEngine works with SocketChannel. Later i wanted to create solution adapted to my implementation. Unfortunately, this example does not work. It's stuck after runDelegatedTasks() method executing. Server console output:

Server: listening at sun.nio.ch.ServerSocketChannelImpl[/0.0.0.0:12345]
Server: select count=1
Server: accepted java.nio.channels.SocketChannel[connected local=/127.0.0.1:12345 remote=/127.0.0.1:52793]
Server: select count=1
Server: reading
Server: read count=0 request=java.nio.HeapByteBuffer[pos=0 lim=16660 cap=16660]

Client console is empty.

Anyone can help with this example?

  • There's an updated version of the code at http://dadaelectronics.asia/wipv3_6/page2/show.jsp?id=230165&db=Entries – user207421 May 30 '14 at 15:57
  • Unfortunately page doesn't work. Maybe you have better example implementation of SSLEngine with SocketChannel or maybe you have updated version of this example? –  May 30 '14 at 22:13
  • The [link](http://dadaelectronics.asia/wipv3_6/files/114/file/23/Net-Source.zip) now works. This *is* my 'better example'. I wrote it. – user207421 May 31 '14 at 04:34

1 Answers1

1

For completeness, the SSLEngineManager code in my book had a bug when used in client mode. The source code was updated shortly after publication and has been made available here until further notice.

Esmond Pitt, author Fundamental Networking in Java.

user207421
  • 305,947
  • 44
  • 307
  • 483