You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/12 08:04:39 UTC
[15/19] httpcomponents-core git commit: Add
org.apache.http.ssl.SSLContextBuilder.toString() for debugging and logging.
Add org.apache.http.ssl.SSLContextBuilder.toString() for debugging and logging.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/05bd4af6
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/05bd4af6
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/05bd4af6
Branch: refs/heads/4.4.x
Commit: 05bd4af6e917e343f5317c4d5761b85a32f1fdc2
Parents: a3c2fbd
Author: Gary D. Gregory <gg...@apache.org>
Authored: Tue May 9 02:48:30 2017 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri May 12 09:54:21 2017 +0200
----------------------------------------------------------------------
.../org/apache/http/ssl/SSLContextBuilder.java | 31 +++++++++++++-------
1 file changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/05bd4af6/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java b/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
index 20d9eee..f736adb 100644
--- a/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
+++ b/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
@@ -79,8 +79,8 @@ public class SSLContextBuilder {
static final String TLS = "TLS";
private String protocol;
- private final Set<KeyManager> keymanagers;
- private final Set<TrustManager> trustmanagers;
+ private final Set<KeyManager> keyManagers;
+ private final Set<TrustManager> trustManagers;
private SecureRandom secureRandom;
private Provider provider;
@@ -90,15 +90,15 @@ public class SSLContextBuilder {
public SSLContextBuilder() {
super();
- this.keymanagers = new LinkedHashSet<KeyManager>();
- this.trustmanagers = new LinkedHashSet<TrustManager>();
+ this.keyManagers = new LinkedHashSet<KeyManager>();
+ this.trustManagers = new LinkedHashSet<TrustManager>();
}
/**
- * Sets the SSLContext algorithm name.
+ * Sets the SSLContext protocol algorithm name.
*
* @param protocol
- * the SSLContext algorithm name of the requested protocol. See
+ * the SSLContext protocol algorithm name of the requested protocol. See
* the SSLContext section in the <a href=
* "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext">Java
* Cryptography Architecture Standard Algorithm Name
@@ -116,10 +116,10 @@ public class SSLContextBuilder {
}
/**
- * Sets the SSLContext algorithm name.
+ * Sets the SSLContext protocol algorithm name.
*
* @param protocol
- * the SSLContext algorithm name of the requested protocol. See
+ * the SSLContext protocol algorithm name of the requested protocol. See
* the SSLContext section in the <a href=
* "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext">Java
* Cryptography Architecture Standard Algorithm Name
@@ -168,7 +168,7 @@ public class SSLContextBuilder {
}
}
for (final TrustManager tm : tms) {
- this.trustmanagers.add(tm);
+ this.trustManagers.add(tm);
}
}
return this;
@@ -245,7 +245,7 @@ public class SSLContextBuilder {
}
}
for (final KeyManager km : kms) {
- keymanagers.add(km);
+ keyManagers.add(km);
}
}
return this;
@@ -322,7 +322,7 @@ public class SSLContextBuilder {
} else {
sslContext = SSLContext.getInstance(protocolStr);
}
- initSSLContext(sslContext, keymanagers, trustmanagers, secureRandom);
+ initSSLContext(sslContext, keyManagers, trustManagers, secureRandom);
return sslContext;
}
@@ -449,4 +449,13 @@ public class SSLContextBuilder {
}
+ /**
+ * @since 4.4.7
+ */
+ @Override
+ public String toString() {
+ return "[provider=" + provider + ", protocol=" + protocol + ", keymanagers=" + keyManagers
+ + ", trustmanagers=" + trustManagers + ", secureRandom=" + secureRandom + "]";
+ }
+
}