aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@intl.att.com>2019-10-15 20:48:56 +0300
committerOfir Sonsino <os0695@intl.att.com>2019-10-15 20:48:56 +0300
commitb6ac738434954b586b751f7a04ff3d1ea94f1460 (patch)
tree3c8fe01ba26473dbcfdda9e6a927962029cd80bc /sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java
parent75b5636a5ecb293b021409e287d4c22481c1aa90 (diff)
Aligning elalto branch to 1.4.05.0.2-ONAP1.4.0elalto
Change-Id: Iaca7575f385ee448b54ccaf1f8c2b9b6668a3739 Issue-ID: SDC-2504 Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
Diffstat (limited to 'sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java')
-rw-r--r--sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java
index 7871816..a93b4a7 100644
--- a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java
+++ b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpAsdcClient.java
@@ -3,7 +3,6 @@
* sdc-distribution-client
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Modifications copyright (C) 2019 Nokia. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +29,6 @@ import java.security.KeyStore;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
-import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -43,6 +41,7 @@ import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
+import org.apache.commons.codec.binary.Base64;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
@@ -84,7 +83,7 @@ public class HttpAsdcClient implements IHttpAsdcClient {
initSSL(username, password, configuraion.getKeyStorePath(), configuraion.getKeyStorePassword(), configuraion.activateServerTLSAuth());
String userNameAndPassword = username + ":" + password;
- this.authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(userNameAndPassword.getBytes());
+ this.authHeaderValue = "Basic " + Base64.encodeBase64String(userNameAndPassword.getBytes());
}
// @SuppressWarnings("deprecation")