You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Sungwon Jung <th...@gmail.com> on 2007/09/06 19:47:23 UTC

SSLFilter()

Hello. I'm using MINA 1.1.2.

I added SSLFilter like that.

--
cfg_ssl.getFilterChain().addLast( "ssl", new SSLFilter(
SSLContextFactory.getInstance( IS_SERVER ) ) );
--

but it cannot receive non-ssl message from socket. (in ServerHandler.java)
but when I comment cfg_ssl.getFilterChain().addLast( "ssl", new
SSLFilter..... ),
MINA can receive non-ssl message from socket.

public void messageReceived(IoSession session, Object message) throws
Exception {
  logger.debug( "message received" );
}

why messageReceived() is not called?

Thank you.

Re: SSLFilter()

Posted by Trustin Lee <tr...@gmail.com>.
On 9/7/07, Sungwon Jung <th...@gmail.com> wrote:
> Hello. I'm using MINA 1.1.2.
>
> I added SSLFilter like that.
>
> --
> cfg_ssl.getFilterChain().addLast( "ssl", new SSLFilter(
> SSLContextFactory.getInstance( IS_SERVER ) ) );
> --
>
> but it cannot receive non-ssl message from socket. (in ServerHandler.java)
> but when I comment cfg_ssl.getFilterChain().addLast( "ssl", new
> SSLFilter..... ),
> MINA can receive non-ssl message from socket.
>
> public void messageReceived(IoSession session, Object message) throws
> Exception {
>   logger.debug( "message received" );
> }
>
> why messageReceived() is not called?

It seems like you sent plain text message from a client to a server
with an SSLFilter inserted.  SSLFilter is expected to throw an
exception instead of firing messageReceived event because it simply
doesn't understand non-SSL messages.  Please refer to StartTLS
implementation as I already told you in the other thread.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6