summaryrefslogtreecommitdiffstats
path: root/cadi/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'cadi/core/src')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java4
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java2
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java14
3 files changed, 12 insertions, 8 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
index 8467c7c6..97984b03 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
@@ -398,4 +398,8 @@ public class PropAccess implements Access {
public void set(LogIt logit) {
logIt = logit;
}
+
+ public String toString() {
+ return props.toString();
+ }
}
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
index 2f9de6cf..3d668c42 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
@@ -774,7 +774,7 @@ public class Config {
Method meth = lcls.getMethod("create",String.class);
locator = (Locator<URI>)meth.invoke(null,url);
} catch (Exception e) {
- access.log(Level.INIT, e);
+ access.log(Level.DEBUG, "(Not fatal) Cannot load by create(String)", e);
}
if (locator==null) {
URI locatorURI = new URI(url);
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
index bb9981bf..e3eb34be 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
@@ -152,7 +152,9 @@ public class SecurityInfo {
protected void initializeKeyManager() throws CadiException, IOException, NoSuchAlgorithmException, KeyStoreException, CertificateException, UnrecoverableKeyException {
String keyStore = access.getProperty(Config.CADI_KEYSTORE, null);
- if (keyStore != null && !new File(keyStore).exists()) {
+ if(keyStore==null) {
+ return;
+ } else if (!new File(keyStore).exists()) {
throw new CadiException(keyStore + " does not exist");
}
@@ -201,16 +203,14 @@ public class SecurityInfo {
protected void initializeTrustManager() throws NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, CadiException {
String trustStore = access.getProperty(Config.CADI_TRUSTSTORE, null);
- if (trustStore != null && !new File(trustStore).exists()) {
+ if(trustStore==null) {
+ return;
+ } else if(!new File(trustStore).exists()) {
throw new CadiException(trustStore + " does not exist");
}
- if (trustStore == null) {
- return;
- }
-
String trustStorePasswd = access.getProperty(Config.CADI_TRUSTSTORE_PASSWORD, null);
- trustStorePasswd = (trustStorePasswd == null) ? "changeit"/*defacto Java Trust Pass*/ : access.decrypt(trustStorePasswd, false);
+ trustStorePasswd = (trustStorePasswd == null ) ? "changeit"/*defacto Java Trust Pass*/ : access.decrypt(trustStorePasswd, false);
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(SSL_KEY_MANAGER_FACTORY_ALGORITHM);
File file;