Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 58368 invoked from network); 22 Oct 2009 15:42:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 15:42:34 -0000 Received: (qmail 95880 invoked by uid 500); 22 Oct 2009 15:42:34 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 95811 invoked by uid 500); 22 Oct 2009 15:42:33 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 95802 invoked by uid 99); 22 Oct 2009 15:42:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 15:42:33 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 15:42:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3684323888D7; Thu, 22 Oct 2009 15:42:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r828758 - in /cxf/trunk: api/src/main/java/org/apache/cxf/configuration/jsse/ common/schemas/src/main/resources/schemas/configuration/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ rt/transports/http/src/main/j... Date: Thu, 22 Oct 2009 15:41:59 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091022154200.3684323888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Thu Oct 22 15:41:58 2009 New Revision: 828758 URL: http://svn.apache.org/viewvc?rev=828758&view=rev Log: [CXF-2491] Add support for TLS cert contraints Modified patch from Colm applied Added: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertConstraints.java (with props) cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertConstraintsFeature.java (with props) cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertConstraintsInterceptor.java (with props) cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertConstraintsJaxBUtils.java (with props) cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java (with props) cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml (with props) Modified: cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterBase.java cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSServerParametersConfig.java cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterBase.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterBase.java?rev=828758&r1=828757&r2=828758&view=diff ============================================================================== --- cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterBase.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterBase.java Thu Oct 22 15:41:58 2009 @@ -25,6 +25,7 @@ import javax.net.ssl.KeyManager; import javax.net.ssl.TrustManager; +import org.apache.cxf.configuration.security.CertificateConstraintsType; import org.apache.cxf.configuration.security.FiltersType; /** @@ -37,6 +38,7 @@ private String provider; private List ciphersuites = new ArrayList(); private FiltersType cipherSuiteFilters; + private CertificateConstraintsType certConstraints; private SecureRandom secureRandom; private String protocol; @@ -125,6 +127,20 @@ public final void setSecureRandom(SecureRandom random) { secureRandom = random; } + + /** + * Get the certificate constraints type + */ + public CertificateConstraintsType getCertConstraints() { + return certConstraints; + } + + /** + * Set the certificate constraints type + */ + public final void setCertConstraints(CertificateConstraintsType constraints) { + certConstraints = constraints; + } /** * Returns the secure random alogorithm. Modified: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd URL: http://svn.apache.org/viewvc/cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd?rev=828758&r1=828757&r2=828758&view=diff ============================================================================== --- cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd (original) +++ cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd Thu Oct 22 15:41:58 2009 @@ -336,6 +336,48 @@ + + + + This structure holds a list of regular expressions that corresponds to a sequence of + Certificate Constraints on either the Subject or Issuer DN. + + + + + + + + + + + + This structure holds a list of regular expressions that corresponds to a sequence of + Certificate Constraints. The optional combinator attribute refers to whether ALL or + ANY of these regular expressions must be satisfied. + + + + + + + + + + + + + + This type refers to whether ALL or ANY of the DNConstraintsType regular expressions + must be satisfied. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .*O=ApacheTest.* + .*OU=Morpit.* + + + + + + + + + + + + + + + + + + + + + .*O=BadApacheTest.* + + + + + + + + + + + + + + + + + + + + + .*O=ApacheTest.* + .*O=BadApacheTest.* + + + + + + + + + + + + + + + + + + + + + .*O=ApacheTest.* + .*O=BadApacheTest.* + + + + + + + + + + + + + + + + + + + + + .*O=ApacheTest.* + .*O=BadApacheTest.* + + + + + + + + + + + + + + + + + + + + + + .*O=ApacheTest.* + .*O=BadApacheTest.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .*CN=(Bethal|Gordy).* + .*O=ApacheTest.* + + + .*CN=Bethal.* + .*OU=Morpit.* + + + + + + \ No newline at end of file Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml