hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
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 GMT
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 <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  * @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.
  *.
  * <p>
- * 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. 
  * </p>
  * 
  * <p>
- * 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.
  * </p>
  * 
  * <p>
@@ -79,12 +79,13 @@
  * </p>
  * 
  * <p>
- * 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
  * </p>
  * 
  * <p>
@@ -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");
 
 



Mime
View raw message