You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rh...@apache.org on 2020/05/09 03:05:22 UTC

[geode] 02/02: Revert "GEODE-7414_2: modify init() method argument (#5040)"

This is an automated email from the ASF dual-hosted git repository.

rhoughton pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 9d2ffc1ace8eb699e14b8c52512600cba1cd2573
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Fri May 8 16:22:12 2020 -0700

    Revert "GEODE-7414_2: modify init() method argument (#5040)"
    
    This reverts commit 5f9800b291d3a11140eb5a1a972459207e07b50c.
---
 .../geode/net/SSLSocketParameterExtensionIntegrationTest.java     | 8 ++++----
 .../src/main/java/org/apache/geode/internal/admin/SSLConfig.java  | 2 +-
 .../src/main/java/org/apache/geode/net/SSLParameterExtension.java | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/geode-core/src/integrationTest/java/org/apache/geode/net/SSLSocketParameterExtensionIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/net/SSLSocketParameterExtensionIntegrationTest.java
index e8cea3e..6f84f51 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/net/SSLSocketParameterExtensionIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/net/SSLSocketParameterExtensionIntegrationTest.java
@@ -216,17 +216,17 @@ public class SSLSocketParameterExtensionIntegrationTest {
   }
 
   public static class MySSLParameterExtension implements SSLParameterExtension {
-    Properties properties;
+    DistributionConfig config;
 
     @Override
-    public void init(Properties properties) {
-      this.properties = properties;
+    public void init(DistributionConfig config) {
+      this.config = config;
     }
 
     @Override
     public SSLParameters modifySSLClientSocketParameters(SSLParameters parameters) {
       List<SNIServerName> serverNames = new ArrayList<>(1);
-      SNIHostName serverName = new SNIHostName(properties.getProperty(DISTRIBUTED_SYSTEM_ID));
+      SNIHostName serverName = new SNIHostName(String.valueOf(config.getDistributedSystemId()));
       serverNames.add(serverName);
       parameters.setServerNames(serverNames);
       return parameters;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/SSLConfig.java b/geode-core/src/main/java/org/apache/geode/internal/admin/SSLConfig.java
index 8dc9a75..b1e3f07 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/SSLConfig.java
@@ -338,7 +338,7 @@ public class SSLConfig {
         this.sslParameterExtension = null;
         return this;
       }
-      sslParameterExtension.init(ids.getConfig().toProperties());
+      sslParameterExtension.init(ids.getConfig());
       this.sslParameterExtension = sslParameterExtension;
       return this;
     }
diff --git a/geode-core/src/main/java/org/apache/geode/net/SSLParameterExtension.java b/geode-core/src/main/java/org/apache/geode/net/SSLParameterExtension.java
index 3fa39b4..0ed4465 100644
--- a/geode-core/src/main/java/org/apache/geode/net/SSLParameterExtension.java
+++ b/geode-core/src/main/java/org/apache/geode/net/SSLParameterExtension.java
@@ -15,10 +15,10 @@
 
 package org.apache.geode.net;
 
-import java.util.Properties;
-
 import javax.net.ssl.SSLParameters;
 
+import org.apache.geode.distributed.internal.DistributionConfig;
+
 /**
  * User implementation of a SSLParameter extension logic.
  *
@@ -29,9 +29,9 @@ public interface SSLParameterExtension {
   /**
    * Initialize the SSLParameterExtension.
    *
-   * @param properties the Properties
+   * @param config the DistributionConfig
    */
-  default void init(Properties properties) {}
+  default void init(DistributionConfig config) {}
 
   default SSLParameters modifySSLClientSocketParameters(SSLParameters parameters) {
     return parameters;