summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-09 14:47:39 -0500
committerBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-09 14:50:41 -0500
commitf4e724a45e3b00bbcb7ca5ab983cd7b7bb8e7356 (patch)
tree4c12b15329726fa7d112614b08150ebc8208ee69
parentcf65b483f546a9ed3e08f9417670d10122f46ab8 (diff)
supporting clear text and obfuscated client cert
supporting clear text and obfuscated client cert Change-Id: I2e5332839993283446904ca6065d7ead8b29cb0f Issue-ID: AAI-2046 Signed-off-by: Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com>
-rw-r--r--src/main/java/org/onap/aai/rest/RestClientProducer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/rest/RestClientProducer.java b/src/main/java/org/onap/aai/rest/RestClientProducer.java
index 24c8eee..4170525 100644
--- a/src/main/java/org/onap/aai/rest/RestClientProducer.java
+++ b/src/main/java/org/onap/aai/rest/RestClientProducer.java
@@ -241,10 +241,12 @@ public class RestClientProducer extends DefaultProducer {
+ " keystore=" + keystoreFilename + " keystorePassword=" + keystorePassword);
}
+ String deobfuscatedCertPassword = keystorePassword.startsWith("OBF:")?Password.deobfuscate(keystorePassword):keystorePassword;
+
// Create REST client for search service
restClient = new RestClient().validateServerHostname(false).validateServerCertChain(true)
.clientCertFile(clientCertFilename)
- .clientCertPassword(Password.deobfuscate(keystorePassword)).trustStore(keystoreFilename);
+ .clientCertPassword(deobfuscatedCertPassword).trustStore(keystoreFilename);
}
return restClient;