aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-25 14:06:07 -0500
committerBansal, Nitin (nb121v) <nitin.bansal@amdocs.com>2019-01-25 14:08:00 -0500
commit9b24ce96791d9eb29513f3014d790e8a0f03a1e1 (patch)
tree0c0f72735fac0a8124a36d8e04b15492dfdb3d16 /src/main/java
parentf4e724a45e3b00bbcb7ca5ab983cd7b7bb8e7356 (diff)
align router code with 1.2.1 version of rest c
align router code with 1.2.1 version of rest client Change-Id: I3b7c9a5ef804de8247d513b58d3928bc9201e47f Issue-ID: AAI-2120 Signed-off-by: Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/aai/rest/RestClientProducer.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/onap/aai/rest/RestClientProducer.java b/src/main/java/org/onap/aai/rest/RestClientProducer.java
index 4170525..5062018 100644
--- a/src/main/java/org/onap/aai/rest/RestClientProducer.java
+++ b/src/main/java/org/onap/aai/rest/RestClientProducer.java
@@ -27,6 +27,7 @@ import org.onap.aai.event.EventBusConsumer;
import org.onap.aai.restclient.client.Headers;
import org.onap.aai.restclient.client.OperationResult;
import org.onap.aai.restclient.client.RestClient;
+import org.onap.aai.restclient.enums.RestAuthenticationMode;
import org.onap.aai.restclient.rest.HttpUtil;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
@@ -231,22 +232,21 @@ public class RestClientProducer extends DefaultProducer {
private RestClient getRestClient() {
if (restClient == null) {
-
- String keystoreFilename = endpoint.getEcompKeystore();
+
String keystorePassword = endpoint.getEcompKeystorePassword();
String clientCertFilename = endpoint.getEcompClientCert();
if (logger.isDebugEnabled()) {
logger.debug("Instantiating REST Client with client_cert=" + clientCertFilename
- + " keystore=" + keystoreFilename + " keystorePassword=" + keystorePassword);
+ + " 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(deobfuscatedCertPassword).trustStore(keystoreFilename);
+ restClient = new RestClient().authenticationMode(RestAuthenticationMode.SSL_CERT).validateServerHostname(false)
+ .validateServerCertChain(false).clientCertFile(clientCertFilename)
+ .clientCertPassword(deobfuscatedCertPassword);
}
return restClient;