felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1633120 - in /felix/trunk/http/jetty/src/main: java/org/apache/felix/http/jetty/internal/ resources/OSGI-INF/metatype/
Date Mon, 20 Oct 2014 12:11:19 GMT
Author: fmeschbe
Date: Mon Oct 20 12:11:19 2014
New Revision: 1633120

URL: http://svn.apache.org/r1633120
Log:
FELIX-4674 Applying extended patch by Dominique Pfister (thanks alot)

The extension to the patch is the addition of support for listing included protocols
and add more words to the metatype descriptions.

Modified:
    felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
    felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
    felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties
    felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml

Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java?rev=1633120&r1=1633119&r2=1633120&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
(original)
+++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
Mon Oct 20 12:11:19 2014
@@ -127,6 +127,12 @@ public final class JettyConfig
     /** Felix specific property to specify whether a server header should be sent (defaults
to true) */
     public static final String FELIX_JETTY_SEND_SERVER_HEADER = "org.apache.felix.http.jetty.sendServerHeader";
 
+    /** Felix specific property to configure the included protocols */
+    public static final String FELIX_JETTY_INCLUDED_PROTOCOLS = "org.apache.felix.https.jetty.protocols.included";
+
+    /** Felix specific property to configure the excluded protocols */
+    public static final String FELIX_JETTY_EXCLUDED_PROTOCOLS = "org.apache.felix.https.jetty.protocols.excluded";
+
     private static String validateContextPath(String ctxPath)
     {
         // undefined, empty, or root context path
@@ -197,6 +203,16 @@ public final class JettyConfig
         return getStringArrayProperty(FELIX_JETTY_EXCLUDED_SUITES, getStringArrayProperty(FELIX_JETTY_EXCLUDED_SUITES_OLD,
null));
     }
 
+    public String[] getIncludedProtocols()
+    {
+        return getStringArrayProperty(FELIX_JETTY_INCLUDED_PROTOCOLS, null);
+    }
+
+    public String[] getExcludedProtocols()
+    {
+        return getStringArrayProperty(FELIX_JETTY_EXCLUDED_PROTOCOLS, null);
+    }
+
     public int getHeaderSize()
     {
         return getIntProperty(FELIX_JETTY_HEADER_BUFFER_SIZE, 16 * 1024);

Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java?rev=1633120&r1=1633119&r2=1633120&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
(original)
+++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Mon Oct 20 12:11:19 2014
@@ -383,6 +383,16 @@ public final class JettyService extends 
         {
             connector.setIncludeCipherSuites(this.config.getIncludedCipherSuites());
         }
+
+        if (this.config.getIncludedProtocols() != null)
+        {
+            connector.getSslContextFactory().setIncludeProtocols(this.config.getIncludedProtocols());
+        }
+
+        if (this.config.getExcludedProtocols() != null)
+        {
+            connector.getSslContextFactory().setExcludeProtocols(this.config.getExcludedProtocols());
+        }
     }
 
     private void configureConnector(final Connector connector, int port)

Modified: felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1633120&r1=1633119&r2=1633120&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties Mon Oct
20 12:11:19 2014
@@ -142,5 +142,20 @@ org.apache.felix.https.jetty.cipersuites
 org.apache.felix.https.jetty.cipersuites.included.description = List of cipher \
   suites that should be included. Default is none.
 
+org.apache.felix.https.jetty.protocols.included.name = Included protocols
+org.apache.felix.https.jetty.protocols.included.description = List of SSL protocols \
+  to include by default. Protocols may be any supported by the Java \
+  platform such as SSLv2Hello, SSLv3, TLSv1, TLSv1.1, or TLSv1.2. Any \
+  listed protocl not supported is silently ignored. Default \
+  is none assuming to use any protocol enabled and supported on the platform.
+  
+org.apache.felix.https.jetty.protocols.excluded.name = Excluded protocols
+org.apache.felix.https.jetty.protocols.excluded.description = List of SSL protocols \
+  to exclude. This property further restricts the enabled protocols by \
+  explicitly disabling.  Any protocol listed in both this property and the \
+  Included protocols property is excluded. Default is none such as to \
+  accept all protocols enabled on platform or explicitly listed by the \
+  Included protocols property.
+
 org.apache.felix.http.jetty.sendServerHeader.name = Send Server Header
 org.apache.felix.http.jetty.sendServerHeader.description = If enabled, the server header
is sent.
\ No newline at end of file

Modified: felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml?rev=1633120&r1=1633119&r2=1633120&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml (original)
+++ felix/trunk/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml Mon Oct 20 12:11:19
2014
@@ -49,6 +49,8 @@
         <AD id="org.apache.felix.https.jetty.cipersuites.excluded" type="String" cardinality="2147483647"
name="%org.apache.felix.https.jetty.cipersuites.excluded.name" description="%org.apache.felix.https.jetty.cipersuites.excluded.description"/>
         <AD id="org.apache.felix.https.jetty.cipersuites.included" type="String" cardinality="2147483647"
name="%org.apache.felix.https.jetty.cipersuites.included.name" description="%org.apache.felix.https.jetty.cipersuites.included.description"/>
         <AD id="org.apache.felix.http.jetty.sendServerHeader" type="Boolean" default="true"
name="%org.apache.felix.http.jetty.sendServerHeader.name" description="%org.apache.felix.http.jetty.sendServerHeader.description"/>
+        <AD id="org.apache.felix.https.jetty.protocols.included" type="String" cardinality="2147483647"
name="%org.apache.felix.https.jetty.protocols.included.name" description="%org.apache.felix.https.jetty.protocols.included.description"/>
+        <AD id="org.apache.felix.https.jetty.protocols.excluded" type="String" cardinality="2147483647"
name="%org.apache.felix.https.jetty.protocols.excluded.name" description="%org.apache.felix.https.jetty.protocols.excluded.description"/>
     </OCD>
     <Designate pid="org.apache.felix.http">
         <Object ocdref="org.apache.felix.http"/>



Mime
View raw message