From 1d3b5fa96b41dd13e1d9f9f1c0e1d3929e4a432d Mon Sep 17 00:00:00 2001 From: "Bansal, Nitin (nb121v)" Date: Thu, 10 Jan 2019 10:53:20 -0500 Subject: Support clear text keystore pwd Support clear text keystore pwd Change-Id: I49580543ebadbe0d578695b01d973e13b2bac9c6 Issue-ID: AAI-2046 Signed-off-by: Bansal, Nitin (nb121v) --- src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java b/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java index bbdb4c8..612a40e 100644 --- a/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java +++ b/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java @@ -96,13 +96,14 @@ public class SearchServiceAgent { String documentEndpoint, Logger logger) { + String deobfuscatedCertPassword = keystorePwd.startsWith("OBF:")?Password.deobfuscate(keystorePwd):keystorePwd; // Create REST client for search service searchClient = new RestClient() .authenticationMode(RestAuthenticationMode.SSL_CERT) .validateServerHostname(false) .validateServerCertChain(true) .clientCertFile(DataRouterConstants.DR_HOME_AUTH + certName) - .clientCertPassword(Password.deobfuscate(keystorePwd)) + .clientCertPassword(deobfuscatedCertPassword) .trustStore(DataRouterConstants.DR_HOME_AUTH + keystore); this.searchUrl = searchUrl; -- cgit 1.2.3-korg