Question

Has anyone had any experience implementing SNI (Server Name Indication) into Apache MINA's SSLFilter?

Any direction would be greatly appreciated.

Was it helpful?

Solution

What we ended up doing was creating a custom SslFilter that extends SslFilter. It turns out if that the SslEngine is supplied with a String peerHost, and a int peerPort, it will take care of the SNI for you. They don't state anything explicitly about SNI in the documentation but it does seem to work. In our custom SslFilter we overrode the onPreAdd to get the IoSession and set the PEER_ADDRESS attribute to the remoteAddress we wanted. We also override the setRemoteAddr(InetSocketAddress addr) and the Constructor to call super(sslContext, true);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top