You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/07/09 07:57:45 UTC

svn commit: r962421 - in /james/server/trunk: imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java spring-deployment/src/main/config/james/imapserver.xml

Author: norman
Date: Fri Jul  9 05:57:45 2010
New Revision: 962421

URL: http://svn.apache.org/viewvc?rev=962421&view=rev
Log:
Fix SMTPS/POP3S/IMAPS (JAMES-1025)

Modified:
    james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java
    james/server/trunk/spring-deployment/src/main/config/james/imapserver.xml

Modified: james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java?rev=962421&r1=962420&r2=962421&view=diff
==============================================================================
--- james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java (original)
+++ james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/NioImapServer.java Fri Jul  9 05:57:45 2010
@@ -21,6 +21,7 @@ package org.apache.james.imapserver.nett
 import static org.jboss.netty.channel.Channels.pipeline;
 
 import javax.annotation.Resource;
+import javax.net.ssl.SSLEngine;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
@@ -105,7 +106,12 @@ public class NioImapServer extends Abstr
                 pipeline.addLast("connectionPerIpLimit", new ConnectionPerIpLimitUpstreamHandler(NioImapServer.this.connPerIP));
 
                 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));
+                    
                 }
                 final ImapRequestStreamHandler handler = new ImapRequestStreamHandler(decoder, processor, encoder);
                 

Modified: james/server/trunk/spring-deployment/src/main/config/james/imapserver.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/imapserver.xml?rev=962421&r1=962420&r2=962421&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/imapserver.xml (original)
+++ james/server/trunk/spring-deployment/src/main/config/james/imapserver.xml Fri Jul  9 05:57:45 2010
@@ -21,6 +21,7 @@
 <!-- Disabling blocks will stop them from listening, -->
 <!-- but does not free as many resources as removing them would -->
 <imapserver enabled="true">
+    <!-- port 993 is the well-known/IANA registered port for IMAPS  ie over SSL/TLS -->
     <!-- port 143 is the well-known/IANA registered port for IMAP -->
     <port>143</port>
 



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