geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject geode git commit: GEODE-3393: One-way SSL commit failing with userHome/.keystore not found [Forced Update!]
Date Thu, 03 Aug 2017 22:15:28 GMT
Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3393 9a8700af7 -> a21003823 (forced update)


GEODE-3393: One-way SSL commit failing with userHome/.keystore not found

Signed-off-by: Galen O'Sullivan <gosulivan@pivotal.io>


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/a2100382
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/a2100382
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/a2100382

Branch: refs/heads/feature/GEODE-3393
Commit: a21003823adf169e133fa36d89219d0e17a84367
Parents: 4f5262f
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Thu Aug 3 15:09:43 2017 -0700
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Thu Aug 3 15:13:48 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/geode/internal/net/SocketCreator.java  | 4 +---
 .../org/apache/geode/internal/net/SocketCreatorJUnitTest.java   | 5 ++++-
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/a2100382/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
index 0caf18a..bd58b0b 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
@@ -468,8 +468,7 @@ public class SocketCreator {
     TrustManager[] trustManagers = null;
     GfeConsoleReader consoleReader = GfeConsoleReaderFactory.getDefaultConsoleReader();
 
-    if(sslConfig.getTruststore() == null)
-    {
+    if (sslConfig.getTruststore() == null) {
       return trustManagers;
     }
 
@@ -531,7 +530,6 @@ public class SocketCreator {
       NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException {
     GfeConsoleReader consoleReader = GfeConsoleReaderFactory.getDefaultConsoleReader();
 
-//    If the keystore path is not set aka null, return a null keyManager
     if (sslConfig.getKeystore() == null) {
       return null;
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/a2100382/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
index f6d263f..482b5f9 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
@@ -14,9 +14,12 @@ public class SocketCreatorJUnitTest {
     SSLConfig testSSLConfig = new SSLConfig();
     testSSLConfig.setEnabled(true);
     testSSLConfig.setKeystore(null);
+    testSSLConfig.setKeystorePassword("");
     testSSLConfig.setTruststore(getSingleKeyKeystore());
     testSSLConfig.setTruststorePassword("password");
-    SocketCreator socketCreator = new SocketCreator(testSSLConfig);
+    //GEODE-3393: This would fail with java.io.FileNotFoundException: $USER_HOME/.keystore
+    new SocketCreator(testSSLConfig);
+
   }
 
   private String getSingleKeyKeystore() {


Mime
View raw message