Author: remm
Date: Thu Mar 10 09:38:16 2016
New Revision: 1734375

URL: http://svn.apache.org/viewvc?rev=1734375&view=rev
Log:
Remove APR listener documentation duplication.
59150: Add a new useOpenSSL flag, default to true.

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Connector.java
    tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
    tomcat/trunk/webapps/docs/apr.xml
    tomcat/trunk/webapps/docs/changelog.xml
    tomcat/trunk/webapps/docs/config/listeners.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1734375&r1=1734374&r2=1734375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Thu Mar 10 
09:38:16 2016
@@ -996,6 +996,7 @@ public class Connector extends Lifecycle
                             getProtocolHandlerClassName()));
         }
         if (AprLifecycleListener.isAprAvailable() &&
+                AprLifecycleListener.getUseOpenSSL() &&
                 protocolHandler instanceof AbstractHttp11JsseProtocol) {
             AbstractHttp11JsseProtocol<?> jsseProtocolHandler =
                     (AbstractHttp11JsseProtocol<?>) protocolHandler;

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1734375&r1=1734374&r2=1734375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Thu 
Mar 10 09:38:16 2016
@@ -79,6 +79,7 @@ public class AprLifecycleListener
     protected static boolean aprInitialized = false;
     protected static boolean aprAvailable = false;
     protected static boolean useAprConnector = false;
+    protected static boolean useOpenSSL = true;
     protected static boolean fipsModeActive = false;
 
     /**
@@ -405,4 +406,14 @@ public class AprLifecycleListener
         return useAprConnector;
     }
 
+    public void setUseOpenSSL(boolean useOpenSSL) {
+        if (useOpenSSL != AprLifecycleListener.useOpenSSL) {
+            AprLifecycleListener.useOpenSSL = useOpenSSL;
+        }
+    }
+
+    public static boolean getUseOpenSSL() {
+        return useOpenSSL;
+    }
+
 }

Modified: tomcat/trunk/webapps/docs/apr.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/apr.xml?rev=1734375&r1=1734374&r2=1734375&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/apr.xml (original)
+++ tomcat/trunk/webapps/docs/apr.xml Thu Mar 10 09:38:16 2016
@@ -130,42 +130,8 @@
   </section>
 
   <section name="APR Lifecycle Listener Configuration">
-    <subsection name="AprLifecycleListener">
-    <attributes>
-    <attribute name="FIPSMode" required="false">
-    <p>
-      Allows using OpenSSL FIPS mode. If set to <code>on</code>, Tomcat will 
enter FIPS mode if needed.
-      If set to <code>require</code>, Tomcat will fail to start if FIPS mode 
was not active. If set
-      to <code>enter</code>, Tomcat will enter FIPS mode and will cause an 
error if FIPS mode was active.
-      If unset or set to <code>off</code>, Tomcat will not check FIPS status.
-    </p>
-    </attribute>
-    <attribute name="SSLEngine" required="false">
-    <p>
-      Name of the SSLEngine to use. off: Do not use SSL, on: Use SSL but no 
specific ENGINE.
-      The default value is <b>on</b>.
-      This initializes the native SSL engine, then enable the use of this 
engine in the connector
-      using the <code>SSLEnabled</code> attribute. Example:
-    </p>
-      <source><![CDATA[<Listener 
className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" 
/>]]></source>
-
-    <p>See the <a href="http://www.openssl.org";>Official OpenSSL
-       website</a> for more details on SSL hardware engines and manufacturers.
-    </p>
-    </attribute>
-    <attribute name="SSLRandomSeed" required="false">
-    <p>
-      If specified, this sets a random source that will be used by OpenSSL.
-    </p>
-    </attribute>
-    <attribute name="useAprConnector" required="false">
-    <p>
-      Set to <code>true</code> to use the APR connector by default. The 
default value is
-      <code>false</code>, which will use the NIO connector with the JSSE 
OpenSSL implementation instead.
-    </p>
-    </attribute>
-    </attributes>
-    </subsection>
+    <p>See <a 
href="config/listeners.html#APR_Lifecycle_Listener_-_org.apache.catalina.core.AprLifecycleListener">the
+    listener configuration</a>.</p>
   </section>
 
   <section name="APR Connectors Configuration">

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1734375&r1=1734374&r2=1734375&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Mar 10 09:38:16 2016
@@ -180,6 +180,10 @@
         added additional (and arguably unnecessary) validation to the provided
         redirect location. (markt)
       </fix>
+      <fix>
+        <bug>59150</bug>: Add an additional flag on APR listener to allow
+        disabling automatic use of OpenSSL. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">

Modified: tomcat/trunk/webapps/docs/config/listeners.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1734375&r1=1734374&r2=1734375&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/trunk/webapps/docs/config/listeners.xml Thu Mar 10 09:38:16 2016
@@ -128,12 +128,18 @@
 
       <attribute name="useAprConnector" required="false">
         <p>This attribute controls the auto-selection of the connector
-        implementaion. When the <strong>protocol</strong> is specified as
+        implementation. When the <strong>protocol</strong> is specified as
         <code>HTTP/1.1</code> or <code>AJP/1.3</code> then if this attribute is
         <code>true</code> the APR/native connector will be used but if this
         attribute is false the NIO connector will be used.</p>
       </attribute>
 
+      <attribute name="useOpenSSL" required="false">
+        <p>This attribute controls the auto-selection of the OpenSSL JSSE
+        implementation. The default is <code>true</code> which will use OpenSSL
+        if the native library is available and a NIO or NIO2 connector is 
used.</p>
+      </attribute>
+
     </attributes>
 
   </subsection>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to