You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by sp...@apache.org on 2020/04/02 23:58:35 UTC
[ranger] branch master updated: RANGER-2776: Allowing empty
keystore file inorder to support one-way ssl between knox plugin and ranger
This is an automated email from the ASF dual-hosted git repository.
spolavarapu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 9188510 RANGER-2776: Allowing empty keystore file inorder to support one-way ssl between knox plugin and ranger
9188510 is described below
commit 91885108cda7d247247aa6917d056e121271d8a1
Author: Sailaja Polavarapu <sp...@cloudera.com>
AuthorDate: Thu Apr 2 15:02:57 2020 -0700
RANGER-2776: Allowing empty keystore file inorder to support one-way ssl between knox plugin and ranger
---
.../src/main/java/org/apache/ranger/plugin/util/RangerSslHelper.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/util/RangerSslHelper.java b/agents-common/src/main/java/org/apache/ranger/plugin/util/RangerSslHelper.java
index 6f23eae..26eaae2 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/util/RangerSslHelper.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/util/RangerSslHelper.java
@@ -24,7 +24,6 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
@@ -227,7 +226,7 @@ public class RangerSslHelper {
private SSLContext getSSLContext(KeyManager[] kmList, TrustManager[] tmList) {
try {
- if(kmList != null && tmList != null) {
+ if(tmList != null) {
SSLContext sslContext = SSLContext.getInstance(RANGER_SSL_CONTEXT_ALGO_TYPE);
sslContext.init(kmList, tmList, new SecureRandom());
@@ -236,7 +235,7 @@ public class RangerSslHelper {
}
} catch (NoSuchAlgorithmException e) {
LOG.error("SSL algorithm is available in the environment", e);
- } catch (KeyManagementException e) {
+ } catch (Exception e) {
LOG.error("Unable to initialize the SSLContext", e);
}