Github user arankin-irl commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/654#discussion_r222028424
--- Diff: src/java/main/org/apache/zookeeper/common/X509Util.java ---
@@ -85,60 +85,73 @@ public static SSLContext createSSLContext() throws
SSLContextException {
}
public static SSLContext createSSLContext(ZKConfig config) throws
SSLContextException {
- KeyManager[] keyManagers = null;
- TrustManager[] trustManagers = null;
+ if (config.getProperty(ZKConfig.SSL_CLIENT_CONTEXT) != null) {
+ LOG.debug("Loading SSLContext from property '" +
ZKConfig.SSL_CLIENT_CONTEXT + "'");
+ String sslClientContextClass =
config.getProperty(ZKConfig.SSL_CLIENT_CONTEXT);
+ try {
+ Class<?> sslContextClass =
Class.forName(sslClientContextClass);
+ ZKClientSSLContext sslContext = (ZKClientSSLContext)
sslContextClass.newInstance();
--- End diff --
No problem - I've updated the PR.
---