SSL & HttpTunnelingClientSocketChannelFactory

Jason Ward jward.dww at gmail.com
Tue May 26 15:39:30 EDT 2009


Hey Guys - 

Has anyone out there implemented SSL with the
HttpTunnelingClientSocketChannelFactory?

I've been prototyping with both MINA and Netty and can see the advantages of
each. The big advantage I get from Netty is the (native) HttpTunneling
support. But adding SSL has been more difficult than I'd originally thought. 

The example code (HttpTunnelingClientExample) says it's a simple procedure
and left as an exercise, but my attempt to insert a basic SSLHandler into
the pipeline results in an ArrayIndexOutOfBounds exception during handshake.

java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at
org.jboss.netty.buffer.HeapChannelBuffer.setBytes(HeapChannelBuffer.java:130)
	at
org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChannelBuffer.java:390)
	at
org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChannelBuffer.java:395)
	at
org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannel.sendChunk(HttpTunnelingClientSocketChannel.java:171)
	at
org.jboss.netty.channel.socket.http.HttpTunnelWorker.write(HttpTunnelWorker.java:93)
	at
org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketPipelineSink.eventSunk(HttpTunnelingClientSocketPipelineSink.java:88)
	at org.jboss.netty.channel.Channels.write(Channels.java:896)
	at org.jboss.netty.channel.Channels.write(Channels.java:838)
	at
org.jboss.netty.handler.ssl.SslHandler.wrapNonAppData(SslHandler.java:635)
	at org.jboss.netty.handler.ssl.SslHandler.handshake(SslHandler.java:294)
	at
com.prototype.AsyncNettyClientIoHandler.channelConnected(AsyncNettyClientIoHandler.java:27)
...

I'm new to working with SSL directly so I'm sure it's some simple problem on
my end. Still any help figuring it out would be greatly appreciated.
-- 
View this message in context: http://n2.nabble.com/SSL---HttpTunnelingClientSocketChannelFactory-tp2976767p2976767.html
Sent from the Netty User Group mailing list archive at Nabble.com.




More information about the netty-users mailing list