zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arankin-irl <...@git.apache.org>
Subject [GitHub] zookeeper pull request #654: ZOOKEEPER-3160: Custom User SSLContext
Date Tue, 02 Oct 2018 16:47:28 GMT
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.


---

Mime
View raw message