zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] arankin-irl commented on a change in pull request #728: ZOOKEEPER-3160: Custom User SSLContext
Date Thu, 17 Jan 2019 11:17:18 GMT
arankin-irl commented on a change in pull request #728: ZOOKEEPER-3160: Custom User SSLContext
URL: https://github.com/apache/zookeeper/pull/728#discussion_r248630588
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java
 ##########
 @@ -220,6 +224,24 @@ public int getSslHandshakeTimeoutMillis() {
     }
 
     public SSLContext createSSLContext(ZKConfig config) throws SSLContextException {
+        if (config.getProperty(sslClientContextProperty) != null) {
+            LOG.debug("Loading SSLContext from property '" + sslClientContextProperty + "'");
+            String sslClientContextClass = config.getProperty(sslClientContextProperty);
+            try {
+                Class<?> sslContextClass = Class.forName(sslClientContextClass);
+                ZKClientSSLContext sslContext = (ZKClientSSLContext) sslContextClass.getConstructor().newInstance();
 
 Review comment:
   I'm not exactly sure what you mean here. Supplier is a functional interface, but we're
initialising it from a property. Do you mean that users should implement the Supplier interface
in the class that they pass in? That wouldn't really seem to match the intent of functional
interfaces - which would generally be passed as a lambda expression or method reference.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message