hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1631230 - in /httpcomponents/httpclient/trunk/httpclient/src: examples/org/apache/http/examples/client/ main/java-deprecated/org/apache/http/conn/ssl/ main/java/org/apache/http/conn/ssl/ main/java/org/apache/http/impl/client/ test/java/org...
Date Sun, 12 Oct 2014 17:43:09 GMT
Author: olegk
Date: Sun Oct 12 17:43:08 2014
New Revision: 1631230

URL: http://svn.apache.org/r1631230
Log:
Use SSLContextBuilder from HttpCore

Added:
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
  (contents, props changed)
      - copied, changed from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyDetails.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
  (contents, props changed)
      - copied, changed from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
  (contents, props changed)
      - copied, changed from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContextBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
  (contents, props changed)
      - copied, changed from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContexts.java
Removed:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyDetails.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContextBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContexts.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLContextBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/test/resources/hc-test-1.truststore
    httpcomponents/httpclient/trunk/httpclient/src/test/resources/hc-test-2.truststore
    httpcomponents/httpclient/trunk/httpclient/src/test/resources/test-keypasswd.keystore
    httpcomponents/httpclient/trunk/httpclient/src/test/resources/test.keystore
Modified:
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.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/TrustStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java?rev=1631230&r1=1631229&r2=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java
Sun Oct 12 17:43:08 2014
@@ -61,7 +61,6 @@ import org.apache.http.conn.routing.Http
 import org.apache.http.conn.socket.ConnectionSocketFactory;
 import org.apache.http.conn.socket.PlainConnectionSocketFactory;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.SSLContexts;
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.impl.client.BasicCookieStore;
 import org.apache.http.impl.client.BasicCredentialsProvider;
@@ -80,6 +79,7 @@ import org.apache.http.io.SessionInputBu
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicLineParser;
 import org.apache.http.message.LineParser;
+import org.apache.http.ssl.SSLContexts;
 import org.apache.http.util.CharArrayBuffer;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java?rev=1631230&r1=1631229&r2=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java
Sun Oct 12 17:43:08 2014
@@ -36,10 +36,10 @@ import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.SSLContexts;
 import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContexts;
 import org.apache.http.util.EntityUtils;
 
 /**

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
(from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyDetails.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyDetails.java&r1=1631106&r2=1631230&rev=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyDetails.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
Sun Oct 12 17:43:08 2014
@@ -35,7 +35,10 @@ import java.util.Arrays;
  * Private key details.
  *
  * @since 4.3
+ *
+ * @deprecated (4.4) use {@link org.apache.http.ssl.PrivateKeyDetails}.
  */
+@Deprecated
 public final class PrivateKeyDetails {
 
     private final String type;

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyDetails.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
(from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyStrategy.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyStrategy.java&r1=1631106&r2=1631230&rev=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/PrivateKeyStrategy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
Sun Oct 12 17:43:08 2014
@@ -33,7 +33,10 @@ import java.util.Map;
  * A strategy allowing for a choice of an alias during SSL authentication.
  *
  * @since 4.3
+ *
+ * @deprecated (4.4) use {@link org.apache.http.ssl.PrivateKeyStrategy}.
  */
+@Deprecated
 public interface PrivateKeyStrategy {
 
     /**

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/PrivateKeyStrategy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
(from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContextBuilder.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContextBuilder.java&r1=1631106&r2=1631230&rev=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContextBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
Sun Oct 12 17:43:08 2014
@@ -57,8 +57,11 @@ import org.apache.http.annotation.NotThr
  * Builder for {@link SSLContext} instances.
  *
  * @since 4.3
+ *
+ * @deprecated (4.4) use {@link org.apache.http.ssl.SSLContextBuilder}.
  */
 @NotThreadSafe
+@Deprecated
 public class SSLContextBuilder {
 
     static final String TLS   = "TLS";

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContextBuilder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
(from r1631106, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContexts.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContexts.java&r1=1631106&r2=1631230&rev=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLContexts.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
Sun Oct 12 17:43:08 2014
@@ -38,8 +38,11 @@ import org.apache.http.annotation.Immuta
  * {@link SSLContext} factory methods.
  *
  * @since 4.3
+ *
+ * @deprecated (4.4) use {@link org.apache.http.ssl.SSLContexts}.
  */
 @Immutable
+@Deprecated
 public class SSLContexts {
 
     /**

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/conn/ssl/SSLContexts.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=1631230&r1=1631229&r2=1631230&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
Sun Oct 12 17:43:08 2014
@@ -48,6 +48,7 @@ import org.apache.http.annotation.Thread
 import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
 import org.apache.http.conn.util.PublicSuffixMatcherLoader;
 import org.apache.http.protocol.HttpContext;
+import org.apache.http.ssl.SSLContexts;
 import org.apache.http.util.Args;
 import org.apache.http.util.TextUtils;
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/TrustStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/TrustStrategy.java?rev=1631230&r1=1631229&r2=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/TrustStrategy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/TrustStrategy.java
Sun Oct 12 17:43:08 2014
@@ -26,9 +26,6 @@
  */
 package org.apache.http.conn.ssl;
 
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
 /**
  * A strategy to establish trustworthiness of certificates without consulting the trust manager
  * configured in the actual SSL context. This interface can be used to override the standard
@@ -36,22 +33,6 @@ import java.security.cert.X509Certificat
  *
  * @since 4.1
  */
-public interface TrustStrategy {
-
-    /**
-     * Determines whether the certificate chain can be trusted without consulting the trust
manager
-     * configured in the actual SSL context. This method can be used to override the standard
JSSE
-     * certificate verification process.
-     * <p>
-     * Please note that, if this method returns {@code false}, the trust manager configured
-     * in the actual SSL context can still clear the certificate as trusted.
-     *
-     * @param chain the peer certificate chain
-     * @param authType the authentication type based on the client certificate
-     * @return {@code true} if the certificate can be trusted without verification by
-     *   the trust manager, {@code false} otherwise.
-     * @throws CertificateException thrown if the certificate is not trusted or invalid.
-     */
-    boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException;
+public interface TrustStrategy extends org.apache.http.ssl.TrustStrategy {
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1631230&r1=1631229&r2=1631230&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Sun Oct 12 17:43:08 2014
@@ -83,7 +83,6 @@ import org.apache.http.conn.socket.Layer
 import org.apache.http.conn.socket.PlainConnectionSocketFactory;
 import org.apache.http.conn.ssl.DefaultHostnameVerifier;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.SSLContexts;
 import org.apache.http.conn.ssl.X509HostnameVerifier;
 import org.apache.http.conn.util.PublicSuffixMatcher;
 import org.apache.http.conn.util.PublicSuffixMatcherLoader;
@@ -118,6 +117,7 @@ import org.apache.http.protocol.Immutabl
 import org.apache.http.protocol.RequestContent;
 import org.apache.http.protocol.RequestTargetHost;
 import org.apache.http.protocol.RequestUserAgent;
+import org.apache.http.ssl.SSLContexts;
 import org.apache.http.util.TextUtils;
 import org.apache.http.util.VersionInfo;
 



Mime
View raw message