hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1632839 - in /httpcomponents/httpcore/trunk/httpcore/src: main/java/org/apache/http/ssl/SSLContextBuilder.java test/java/org/apache/http/ssl/TestSSLContextBuilder.java
Date Sat, 18 Oct 2014 20:18:15 GMT
Author: olegk
Date: Sat Oct 18 20:18:14 2014
New Revision: 1632839

URL: http://svn.apache.org/r1632839
Log:
Only use TLS protocol by default when building SSLContext instances

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java?rev=1632839&r1=1632838&r2=1632839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
Sat Oct 18 20:18:14 2014
@@ -68,7 +68,6 @@ import org.apache.http.util.Args;
 public class SSLContextBuilder {
 
     static final String TLS   = "TLS";
-    static final String SSL   = "SSL";
 
     private String protocol;
     private Set<KeyManager> keymanagers;
@@ -85,16 +84,6 @@ public class SSLContextBuilder {
         this.trustmanagers = new HashSet<TrustManager>();
     }
 
-    public SSLContextBuilder useTLS() {
-        this.protocol = TLS;
-        return this;
-    }
-
-    public SSLContextBuilder useSSL() {
-        this.protocol = SSL;
-        return this;
-    }
-
     public SSLContextBuilder useProtocol(final String protocol) {
         this.protocol = protocol;
         return this;

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java?rev=1632839&r1=1632838&r2=1632839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
Sat Oct 18 20:18:14 2014
@@ -92,17 +92,6 @@ public class TestSSLContextBuilder {
     }
 
     @Test
-    public void testBuildUseSSL() throws Exception {
-        final SSLContext sslContext = SSLContextBuilder.create()
-                .useSSL()
-                .build();
-        Assert.assertNotNull(sslContext);
-        Assert.assertEquals("SSL", sslContext.getProtocol());
-        final SSLSocketFactory socketFactory = sslContext.getSocketFactory();
-        Assert.assertNotNull(socketFactory);
-    }
-
-    @Test
     public void testKeyWithAlternatePassword() throws Exception {
         final URL resource1 = getClass().getResource("/test-keypasswd.keystore");
         final String storePassword = "nopassword";



Mime
View raw message