james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r962422 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Date Fri, 09 Jul 2010 05:58:29 GMT
Author: norman
Date: Fri Jul  9 05:58:28 2010
New Revision: 962422

URL: http://svn.apache.org/viewvc?rev=962422&view=rev
Log:
Fix SSL enabled factory (JAMES-1025)

Modified:
    james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java

Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java?rev=962422&r1=962421&r2=962422&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
(original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Fri Jul  9 05:58:28 2010
@@ -19,6 +19,7 @@
 package org.apache.james.protocols.impl;
 
 import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
 
 import org.jboss.netty.channel.ChannelPipeline;
 import org.jboss.netty.channel.group.ChannelGroup;
@@ -42,7 +43,11 @@ public abstract class AbstractSSLAwareCh
         ChannelPipeline pipeline =  super.getPipeline();
 
         if (isSSLSocket()) {
-            pipeline.addFirst("sslHandler", new SslHandler(getSSLContext().createSSLEngine()));
+            // We need to set clientMode to false.
+            // See https://issues.apache.org/jira/browse/JAMES-1025
+            SSLEngine engine = getSSLContext().createSSLEngine();
+            engine.setUseClientMode(false);
+            pipeline.addFirst("sslHandler", new SslHandler(engine));
         }
         return pipeline;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message