hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1618870 - in /httpcomponents/httpclient/trunk/httpclient/src: main/java/org/apache/http/conn/ssl/ test/java/org/apache/http/conn/ssl/
Date Tue, 19 Aug 2014 14:19:22 GMT
Author: olegk
Date: Tue Aug 19 14:19:21 2014
New Revision: 1618870

URL: http://svn.apache.org/r1618870
Log:
Deprecated BrowserCompatHostnameVerifier and StrictHostnameVerifier in favor of DefaultHostnameVerifier

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java?rev=1618870&r1=1618869&r2=1618870&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java
Tue Aug 19 14:19:21 2014
@@ -41,10 +41,12 @@ import org.apache.http.annotation.Immuta
  * (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains,
  * including "a.b.foo.com".
  *
- *
  * @since 4.0
+ *
+ * @deprecated (4.4) Use {@link org.apache.http.conn.ssl.DefaultHostnameVerifier}
  */
 @Immutable
+@Deprecated
 public class BrowserCompatHostnameVerifier extends AbstractVerifier {
 
     public static final BrowserCompatHostnameVerifier INSTANCE = new BrowserCompatHostnameVerifier();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java?rev=1618870&r1=1618869&r2=1618870&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
Tue Aug 19 14:19:21 2014
@@ -123,7 +123,7 @@ import org.apache.http.util.TextUtils;
  *
  * @since 4.3
  */
-@ThreadSafe
+@ThreadSafe @SuppressWarnings("deprecation")
 public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactory {
 
     public static final String TLS   = "TLS";
@@ -146,7 +146,7 @@ public class SSLConnectionSocketFactory 
      * @since 4.4
      */
     public static HostnameVerifier getDefaultHostnameVerifier() {
-        return BrowserCompatHostnameVerifier.INSTANCE;
+        return DefaultHostnameVerifier.INSTANCE;
     }
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java?rev=1618870&r1=1618869&r2=1618870&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java
Tue Aug 19 14:19:21 2014
@@ -50,8 +50,11 @@ import org.apache.http.annotation.Immuta
  *
  *
  * @since 4.0
+ *
+ * @deprecated (4.4) Use {@link org.apache.http.conn.ssl.DefaultHostnameVerifier}
  */
 @Immutable
+@Deprecated
 public class StrictHostnameVerifier extends AbstractVerifier {
 
     public static final StrictHostnameVerifier INSTANCE = new StrictHostnameVerifier();

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java?rev=1618870&r1=1618869&r2=1618870&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
Tue Aug 19 14:19:21 2014
@@ -188,7 +188,7 @@ public class TestHostnameVerifier {
         final InputStream in = new ByteArrayInputStream(CertificatesToPlayWith.X509_MULTIPLE_SUBJECT_ALT);
         final X509Certificate x509 = (X509Certificate) cf.generateCertificate(in);
 
-        final X509HostnameVerifier verifier = SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
+        final X509HostnameVerifier verifier = BrowserCompatHostnameVerifier.INSTANCE;
 
         Assert.assertEquals("CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown,
C=CH",
                 x509.getSubjectDN().getName());



Mime
View raw message