You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by lm...@apache.org on 2018/04/04 20:16:30 UTC
knox git commit: KNOX-1238 - Fix Custom Truststore Settings for
Gateway
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 <lm...@hortonworks.com>
Authored: Wed Apr 4 16:15:44 2018 -0400
Committer: Larry McCay <lm...@hortonworks.com>
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);
}