Return-Path: Delivered-To: apmail-jakarta-httpcomponents-commits-archive@www.apache.org Received: (qmail 28045 invoked from network); 29 Sep 2007 17:41:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2007 17:41:36 -0000 Received: (qmail 94769 invoked by uid 500); 29 Sep 2007 17:41:25 -0000 Delivered-To: apmail-jakarta-httpcomponents-commits-archive@jakarta.apache.org Received: (qmail 94753 invoked by uid 500); 29 Sep 2007 17:41:25 -0000 Mailing-List: contact httpcomponents-commits-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: httpcomponents-dev@jakarta.apache.org Delivered-To: mailing list httpcomponents-commits@jakarta.apache.org Received: (qmail 94744 invoked by uid 99); 29 Sep 2007 17:41:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Sep 2007 10:41:25 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Sep 2007 17:41:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9B0E91A9832; Sat, 29 Sep 2007 10:40:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580615 - in /jakarta/httpcomponents/httpclient/trunk/module-client/src: main/java/org/apache/http/conn/ main/java/org/apache/http/conn/ssl/ main/java/org/apache/http/impl/conn/ test/java/org/apache/http/mockup/ Date: Sat, 29 Sep 2007 17:40:37 -0000 To: httpcomponents-commits@jakarta.apache.org From: rolandw@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070929174038.9B0E91A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rolandw Date: Sat Sep 29 10:40:33 2007 New Revision: 580615 URL: http://svn.apache.org/viewvc?rev=580615&view=rev Log: renamed interface SecureSocketFactory to LayeredSocketFactory Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/LayeredSocketFactory.java - copied, changed from r580601, jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/SecureSocketFactory.java Removed: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/SecureSocketFactory.java Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/Scheme.java jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnectionOperator.java jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/mockup/SecureSocketFactoryMockup.java Copied: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/LayeredSocketFactory.java (from r580601, jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/SecureSocketFactory.java) URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/LayeredSocketFactory.java?p2=jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/LayeredSocketFactory.java&p1=jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/SecureSocketFactory.java&r1=580601&r2=580615&rev=580615&view=diff ============================================================================== --- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/SecureSocketFactory.java (original) +++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/LayeredSocketFactory.java Sat Sep 29 10:40:33 2007 @@ -36,14 +36,14 @@ import java.net.UnknownHostException; /** - * A {@link SocketFactory SocketFactory} for secure sockets (SSL/TLS). + * A {@link SocketFactory SocketFactory} for layered sockets (SSL/TLS). * See there for things to consider when implementing a socket factory. * * @author Michael Becke * @author Mike Bowler * @since 4.0 */ -public interface SecureSocketFactory extends SocketFactory { +public interface LayeredSocketFactory extends SocketFactory { /** * Returns a socket connected to the given host that is layered over an Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/Scheme.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/Scheme.java?rev=580615&r1=580614&r2=580615&view=diff ============================================================================== --- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/Scheme.java (original) +++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/Scheme.java Sat Sep 29 10:40:33 2007 @@ -103,7 +103,7 @@ this.name = name.toLowerCase(); this.socketFactory = factory; this.defaultPort = port; - this.layered = (factory instanceof SecureSocketFactory); + this.layered = (factory instanceof LayeredSocketFactory); } @@ -120,7 +120,7 @@ /** * Obtains the socket factory. * If this scheme is {@link #isLayered layered}, the factory implements - * {@link SecureSocketFactory SecureSocketFactory}. + * {@link LayeredSocketFactory LayeredSocketFactory}. * * @return the socket factory for this scheme */ Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=580615&r1=580614&r2=580615&view=diff ============================================================================== --- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java (original) +++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java Sat Sep 29 10:40:33 2007 @@ -31,7 +31,7 @@ package org.apache.http.conn.ssl; -import org.apache.http.conn.SecureSocketFactory; +import org.apache.http.conn.LayeredSocketFactory; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; @@ -55,20 +55,20 @@ import java.security.UnrecoverableKeyException; /** - * Secure socket factory based on JSSE + * Layered socket factory for TLS/SSL connections, based on JSSE. *. *

- * SSLProtocolSocketFactory can be used to validate the identity of the HTTPS - * server against a list of trusted certificates and to authenticate to the HTTPS - * server using a private key. + * SSLSocketFactory can be used to validate the identity of the HTTPS + * server against a list of trusted certificates and to authenticate to + * the HTTPS server using a private key. *

* *

- * SSLProtocolSocketFactory will enable server authentication when supplied with - * a {@link KeyStore truststore} file containg one or several trusted certificates. - * The client secure socket will reject the connection during the SSL session handshake - * if the target HTTPS server attempts to authenticate itself with a non-trusted - * certificate. + * SSLSocketFactory will enable server authentication when supplied with + * a {@link KeyStore truststore} file containg one or several trusted + * certificates. The client secure socket will reject the connection during + * the SSL session handshake if the target HTTPS server attempts to + * authenticate itself with a non-trusted certificate. *

* *

@@ -79,12 +79,13 @@ *

* *

- * SSLProtocolSocketFactory will enable client authentication when supplied with - * a {@link KeyStore keystore} file containg a private key/public certificate pair. - * The client secure socket will use the private key to authenticate itself to the target - * HTTPS server during the SSL session handshake if requested to do so by the server. - * The target HTTPS server will in its turn verify the certificate presented by the client - * in order to establish client's authenticity + * SSLSocketFactory will enable client authentication when supplied with + * a {@link KeyStore keystore} file containg a private key/public certificate + * pair. The client secure socket will use the private key to authenticate + * itself to the target HTTPS server during the SSL session handshake if + * requested to do so by the server. + * The target HTTPS server will in its turn verify the certificate presented + * by the client in order to establish client's authenticity *

* *

@@ -134,7 +135,7 @@ * @author Julius Davies */ -public class SSLSocketFactory implements SecureSocketFactory { +public class SSLSocketFactory implements LayeredSocketFactory { public static final String TLS = "TLS"; public static final String SSL = "SSL"; @@ -339,9 +340,7 @@ } // isSecure - /** - * @see SecureSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean) - */ + // non-javadoc, see interface LayeredSocketFactory public Socket createSocket( final Socket socket, final String host, Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnectionOperator.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnectionOperator.java?rev=580615&r1=580614&r2=580615&view=diff ============================================================================== --- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnectionOperator.java (original) +++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnectionOperator.java Sat Sep 29 10:40:33 2007 @@ -43,7 +43,7 @@ import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.SocketFactory; -import org.apache.http.conn.SecureSocketFactory; +import org.apache.http.conn.LayeredSocketFactory; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.ClientConnectionOperator; @@ -174,14 +174,14 @@ ("Unknown scheme '" + target.getSchemeName() + "' in target host."); } - if (!(schm.getSocketFactory() instanceof SecureSocketFactory)) { + if (!(schm.getSocketFactory() instanceof LayeredSocketFactory)) { throw new IllegalArgumentException ("Target scheme (" + schm.getName() + - ") must have secure socket factory."); + ") must have layered socket factory."); } - final SecureSocketFactory ssf = - (SecureSocketFactory)schm.getSocketFactory(); + final LayeredSocketFactory ssf = + (LayeredSocketFactory)schm.getSocketFactory(); final Socket sock = ssf.createSocket (conn.getSocket(), target.getHostName(), target.getPort(), true); prepareSocket(sock, context, params); Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/mockup/SecureSocketFactoryMockup.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/mockup/SecureSocketFactoryMockup.java?rev=580615&r1=580614&r2=580615&view=diff ============================================================================== --- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/mockup/SecureSocketFactoryMockup.java (original) +++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/mockup/SecureSocketFactoryMockup.java Sat Sep 29 10:40:33 2007 @@ -32,16 +32,16 @@ import java.net.Socket; -import org.apache.http.conn.SecureSocketFactory; +import org.apache.http.conn.LayeredSocketFactory; /** * {@link SecureSocketFactory} mockup implementation. */ public class SecureSocketFactoryMockup extends SocketFactoryMockup - implements SecureSocketFactory { + implements LayeredSocketFactory { /* A default instance of this mockup. */ - public final static SecureSocketFactory INSTANCE = + public final static LayeredSocketFactory INSTANCE = new SecureSocketFactoryMockup("INSTANCE");