hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r618309 - in /httpcomponents/httpclient/trunk/module-client/src: main/java/org/apache/http/conn/ssl/ test/java/org/apache/http/conn/ssl/
Date Mon, 04 Feb 2008 16:01:25 GMT
Author: olegk
Date: Mon Feb  4 08:01:24 2008
New Revision: 618309

URL: http://svn.apache.org/viewvc?rev=618309&view=rev
Log:
HTTPCLIENT-738: Renamed o.a.http.conn.ssl.HostnameVerifier to o.a.http.conn.ssl.X509HostnameVerifier

Added:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
      - copied, changed from r618216, httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/HostnameVerifier.java
Removed:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/HostnameVerifier.java
Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java?rev=618309&r1=618308&r2=618309&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
Mon Feb  4 08:01:24 2008
@@ -50,12 +50,12 @@
 import javax.net.ssl.SSLSocket;
 
 /**
- * Abstract base class for all standard {@link HostnameVerifier} 
+ * Abstract base class for all standard {@link X509HostnameVerifier} 
  * implementations.
  * 
  * @author Julius Davies
  */
-public abstract class AbstractVerifier implements HostnameVerifier {
+public abstract class AbstractVerifier implements X509HostnameVerifier {
 
     /**
      * This contains a list of 2nd-level domains that aren't allowed to

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=618309&r1=618308&r2=618309&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
Mon Feb  4 08:01:24 2008
@@ -141,13 +141,13 @@
     public static final String SSL   = "SSL";
     public static final String SSLV2 = "SSLv2";
     
-    public static final HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER 
+    public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER 
         = new AllowAllHostnameVerifier();
     
-    public static final HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER 
+    public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER 
         = new BrowserCompatHostnameVerifier();
     
-    public static final HostnameVerifier STRICT_HOSTNAME_VERIFIER 
+    public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER 
         = new StrictHostnameVerifier();
     /**
      * The factory using the default JVM settings for secure connections.
@@ -164,7 +164,7 @@
     
     private final SSLContext sslcontext;
     private final javax.net.ssl.SSLSocketFactory socketfactory;
-    private HostnameVerifier hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
+    private X509HostnameVerifier hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
 
     public SSLSocketFactory(
         String algorithm, 
@@ -360,14 +360,14 @@
         return sslSocket;
     }
 
-    public void setHostnameVerifier(HostnameVerifier hostnameVerifier) {
+    public void setHostnameVerifier(X509HostnameVerifier hostnameVerifier) {
         if ( hostnameVerifier == null ) {
             throw new IllegalArgumentException("Hostname verifier may not be null");
         }
         this.hostnameVerifier = hostnameVerifier;
     }
 
-    public HostnameVerifier getHostnameVerifier() {
+    public X509HostnameVerifier getHostnameVerifier() {
         return hostnameVerifier;
     }
 

Copied: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
(from r618216, httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/HostnameVerifier.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java?p2=httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java&p1=httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/HostnameVerifier.java&r1=618216&r2=618309&rev=618309&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/HostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
Mon Feb  4 08:01:24 2008
@@ -31,6 +31,7 @@
 
 package org.apache.http.conn.ssl;
 
+import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSocket;
@@ -56,7 +57,7 @@
  *
  * @since 4.0 (8-Dec-2006)
  */
-public interface HostnameVerifier extends javax.net.ssl.HostnameVerifier {
+public interface X509HostnameVerifier extends HostnameVerifier {
 
     boolean verify(String host, SSLSession session);
 

Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java?rev=618309&r1=618308&r2=618309&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
Mon Feb  4 08:01:24 2008
@@ -43,7 +43,7 @@
 import junit.framework.TestSuite;
 
 /**
- * Unit tests for {@link HostnameVerifier}.
+ * Unit tests for {@link X509HostnameVerifier}.
  *
  * @author Julius Davies
  * @since 11-Dec-2006
@@ -67,9 +67,9 @@
     }
 
     public void testVerify() throws Exception {
-        HostnameVerifier DEFAULT = new BrowserCompatHostnameVerifier();
-        HostnameVerifier STRICT = new StrictHostnameVerifier();
-        HostnameVerifier ALLOW_ALL = new AllowAllHostnameVerifier();
+        X509HostnameVerifier DEFAULT = new BrowserCompatHostnameVerifier();
+        X509HostnameVerifier STRICT = new StrictHostnameVerifier();
+        X509HostnameVerifier ALLOW_ALL = new AllowAllHostnameVerifier();
         CertificateFactory cf = CertificateFactory.getInstance("X.509");
         InputStream in;
         X509Certificate x509;
@@ -210,7 +210,7 @@
         //exceptionPlease(STRICT,"a.b.\u82b1\u5b50.co.jp", x509 );
     }
 
-    private void exceptionPlease(HostnameVerifier hv, String host,
+    private void exceptionPlease(X509HostnameVerifier hv, String host,
                                  X509Certificate x509) {
         try {
             hv.verify(host, x509);



Mime
View raw message