X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Frest-client.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Frestclient%2Fclient%2FRestClient.java;h=a98f710aa7a11b18698c73dd844c463cb7997b34;hp=02f12b1e76f1c7fe432573131be76efe56dbc7d5;hb=fa337c7571edf97800fc47cdb404160f7da97c8b;hpb=9b97b575d3ebbd3df83fa6a6770e418bbcb546d0 diff --git a/src/main/java/org/onap/aai/restclient/client/RestClient.java b/src/main/java/org/onap/aai/restclient/client/RestClient.java index 02f12b1..a98f710 100644 --- a/src/main/java/org/onap/aai/restclient/client/RestClient.java +++ b/src/main/java/org/onap/aai/restclient/client/RestClient.java @@ -236,6 +236,19 @@ public class RestClient { clientBuilder.setReadTimeoutInMs(timeout); return this; } + + /** + * Configures the client for a specific SSL protocol + * + * @param sslProtocol - protocol string constant such as TLS, TLSv1, TLSv1.1, TLSv1.2 + * + * @return The AAIRESTClient instance. + */ + public RestClient sslProtocol(String sslProtocol) { + logger.debug("Set sslProtocol = " + sslProtocol); + clientBuilder.setSslProtocol(sslProtocol); + return this; + } private boolean shouldRetry(OperationResult operationResult) { @@ -595,7 +608,7 @@ public class RestClient { if (headers != null) { for (Entry> header : headers.entrySet()) { - builder.header(header.getKey(), header.getValue()); + builder.header(header.getKey(), String.join(";",header.getValue())); } if (clientBuilder.getAuthenticationMode() == RestAuthenticationMode.SSL_BASIC) {