aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/crud/dao/DataRouterDAO.java3
-rw-r--r--src/main/java/org/onap/crud/dao/champ/ChampDao.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/onap/crud/dao/DataRouterDAO.java b/src/main/java/org/onap/crud/dao/DataRouterDAO.java
index e5b6d5a..df57beb 100644
--- a/src/main/java/org/onap/crud/dao/DataRouterDAO.java
+++ b/src/main/java/org/onap/crud/dao/DataRouterDAO.java
@@ -29,9 +29,10 @@ import org.onap.crud.util.CrudServiceConstants;
public class DataRouterDAO extends ChampDao {
public DataRouterDAO(String url, String certPassword) {
try {
+ String deobfuscatedCertPassword = certPassword.startsWith("OBF:")?Password.deobfuscate(certPassword):certPassword;
client = new RestClient().authenticationMode(RestAuthenticationMode.SSL_CERT).validateServerHostname(false)
.validateServerCertChain(false).clientCertFile(CrudServiceConstants.CRD_DATAROUTER_AUTH_FILE)
- .clientCertPassword(Password.deobfuscate(certPassword));
+ .clientCertPassword(Password.deobfuscate(deobfuscatedCertPassword));
baseObjectUrl = url + OBJECT_SUB_URL;
baseRelationshipUrl = url + RELATIONSHIP_SUB_URL;
diff --git a/src/main/java/org/onap/crud/dao/champ/ChampDao.java b/src/main/java/org/onap/crud/dao/champ/ChampDao.java
index 8563807..e6fb161 100644
--- a/src/main/java/org/onap/crud/dao/champ/ChampDao.java
+++ b/src/main/java/org/onap/crud/dao/champ/ChampDao.java
@@ -74,9 +74,10 @@ public class ChampDao implements GraphDao {
public ChampDao(String champUrl, String certPassword) {
try {
+ String deobfuscatedCertPassword = certPassword.startsWith("OBF:")?Password.deobfuscate(certPassword):certPassword;
client = new RestClient().authenticationMode(RestAuthenticationMode.SSL_CERT).validateServerHostname(false)
.validateServerCertChain(false).clientCertFile(CrudServiceConstants.CRD_CHAMP_AUTH_FILE)
- .clientCertPassword(Password.deobfuscate(certPassword));
+ .clientCertPassword(Password.deobfuscate(deobfuscatedCertPassword));
baseObjectUrl = champUrl + OBJECT_SUB_URL;
baseRelationshipUrl = champUrl + RELATIONSHIP_SUB_URL;