You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by kr...@apache.org on 2018/12/18 14:46:42 UTC

knox git commit: KNOX-1683 - Ensure truststorePass is set in KnoxSession

Repository: knox
Updated Branches:
  refs/heads/master ef6bb24a1 -> dc90162c3


KNOX-1683 - Ensure truststorePass is set in KnoxSession

Signed-off-by: Kevin Risden <kr...@apache.org>


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

Branch: refs/heads/master
Commit: dc90162c3cc893bc3e64c2f66f5870b336b5eaa0
Parents: ef6bb24
Author: Kevin Risden <kr...@apache.org>
Authored: Tue Dec 18 07:00:16 2018 -0500
Committer: Kevin Risden <kr...@apache.org>
Committed: Tue Dec 18 09:35:11 2018 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/knox/gateway/shell/KnoxSession.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/dc90162c/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSession.java
----------------------------------------------------------------------
diff --git a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSession.java b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSession.java
index e761450..d7d962e 100644
--- a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSession.java
+++ b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSession.java
@@ -314,11 +314,11 @@ public class KnoxSession implements Closeable {
         truststorePass = clientContext.connection().truststorePass();
       } else {
         String truststore = System.getProperty("javax.net.ssl.trustStore");
+        truststorePass = System.getProperty("javax.net.ssl.trustStorePassword", "changeit");
         if (truststore == null) {
           String truststoreDir = System.getProperty("java.home");
           truststore = truststoreDir + File.separator + "lib" + File.separator
               + "security" + File.separator + "cacerts";
-          truststorePass = System.getProperty("javax.net.ssl.trustStorePassword", "changeit");
         }
         file = new File(truststore);
       }