Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 6986 invoked from network); 13 Sep 2007 10:12:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Sep 2007 10:12:27 -0000 Received: (qmail 21754 invoked by uid 500); 13 Sep 2007 10:12:19 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 21728 invoked by uid 500); 13 Sep 2007 10:12:19 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 21719 invoked by uid 99); 13 Sep 2007 10:12:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 03:12:19 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of trustin@gmail.com designates 209.85.198.187 as permitted sender) Received: from [209.85.198.187] (HELO rv-out-0910.google.com) (209.85.198.187) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 10:12:16 +0000 Received: by rv-out-0910.google.com with SMTP id k20so314771rvb for ; Thu, 13 Sep 2007 03:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Jii4tILfGwDaQ0+2PcPyIZHdyXD5/VTxO1QQDHzZJXs=; b=BqE1+GuTFgcN5hr6ZlncVt3Ed8z+eIQMRPRaGcASD1yldHOemip5Rf3hNdzZxHKkW7zjDJSDdhtNNiFQT48otaKjb28DJarSvEkQjibyIuaWJO2AV1szqCW0GZw27FIsgMYWQ1/SfYXBDpl95e5YlZ0MX8UyUP0Te/h+JqwCOx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N0yVXJCJl37EagAncZ/AHd3GSBjQ1VjtiYyzLQjyDE9VNKgbkFoDbJWYLbKnCiIxMwWtOkfdwXIU2L6Eb5/owaJbhyeshYcKJwNm3w7vIiIRtOLZSDQkRy6l+mM0M+/v/0Gfg6lOF5JN3f/Cfif+9gvABFWy5L27YjXPAAs1lr0= Received: by 10.141.50.17 with SMTP id c17mr123642rvk.1189678316185; Thu, 13 Sep 2007 03:11:56 -0700 (PDT) Received: by 10.140.194.2 with HTTP; Thu, 13 Sep 2007 03:11:56 -0700 (PDT) Message-ID: <768dcb2e0709130311m1064dc8by5b7584d2dc32b794@mail.gmail.com> Date: Thu, 13 Sep 2007 19:11:56 +0900 From: "Trustin Lee" To: dev@mina.apache.org Subject: Re: SSLFilter questions In-Reply-To: <976e507d0709060837o3600e0b0r3963bc8ee39cc202@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <976e507d0709060837o3600e0b0r3963bc8ee39cc202@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Sungwon, On 9/7/07, Sungwon Jung wrote: > Hello. I using MINA 1.1.2. > > first of all, sorry about novice question and thanks guys. > > I'm novice in ssl programming but I want two ports in one server. > so I opened normal socket and ssl socket. like this. > > -- > SocketAcceptorConfig cfg_gui = new SocketAcceptorConfig(); > acceptor.bind( new InetSocketAddress( port_gui ), new > GUISessionHandler(), cfg_gui ); > > SocketAcceptorConfig cfg_ssl = new SocketAcceptorConfig(); > cfg_ssl.getFilterChain().addLast( "ssl", new SSLFilter( > SSLContextFactory.getInstance( IS_SERVER ) ) ); > acceptor.bind( new InetSocketAddress( port_ssl ), new > SupremaSessionHandler(), cfg_ssl ); > -- > > and ssl connected device communication process is, > > server <- device : connect > server -> device : (non-ssl) send certification file > server <- device : (non-ssl) ok ack > server <-> device : (ssl) communication > > can I do that using MINA's SSLFilter? > and do you know about other sslfilter example? (I have MINA ssl echo > server example) Sure. It's a kind of StartTLS, so you could take a look at the StartTLS example in SSLFilter Javadoc: http://mina.apache.org/report/1.0/apidocs/org/apache/mina/filter/SSLFilter.html HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6