Repository: knox
Updated Branches:
  refs/heads/master 75f1de312 -> f8cad74ca


KNOX-1238 - Fix Custom Truststore Settings for Gateway

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

Branch: refs/heads/master
Commit: f8cad74ca71768243aadda69bb6cb54067e06656
Parents: 75f1de3
Author: Larry McCay <[email protected]>
Authored: Wed Apr 4 16:15:44 2018 -0400
Committer: Larry McCay <[email protected]>
Committed: Wed Apr 4 16:16:25 2018 -0400

----------------------------------------------------------------------
 .../knox/gateway/services/security/impl/JettySSLService.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/f8cad74c/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/JettySSLService.java
----------------------------------------------------------------------
diff --git 
a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/JettySSLService.java
 
b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/JettySSLService.java
index 378e93c..74e6aee 100644
--- 
a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/JettySSLService.java
+++ 
b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/JettySSLService.java
@@ -190,7 +190,6 @@ public class JettySSLService implements SSLService {
     String truststorePassword = null;
     if (clientAuthNeeded || clientAuthWanted) {
       if (truststorePath != null) {
-        sslContextFactory.setTrustStore(loadKeyStore(keystoreFileName, 
keystoreType, master));
         char[] truststorePwd = null;
         try {
           truststorePwd = 
as.getPasswordFromAliasForGateway(GATEWAY_TRUSTSTORE_PASSWORD);
@@ -203,6 +202,7 @@ public class JettySSLService implements SSLService {
         else {
           truststorePassword = new String(master);
         }
+        sslContextFactory.setTrustStore(loadKeyStore(truststorePath, 
trustStoreType, truststorePassword.toCharArray()));
         sslContextFactory.setTrustStorePassword(truststorePassword);
         sslContextFactory.setTrustStoreType(trustStoreType);
       }

Reply via email to