Skip to content

Commit

Permalink
Ensure to use Jersey Client in JerseyHttpsClientFactory
Browse files Browse the repository at this point in the history
Signed-off-by: FlorianWege-IESE <florian.wege@iese.fraunhofer.de>
  • Loading branch information
FlorianWege-IESE committed Mar 8, 2023
1 parent 47e8441 commit d69a395
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import javax.ws.rs.client.ClientBuilder;

import org.apache.http.conn.ssl.DefaultHostnameVerifier;
import org.glassfish.jersey.client.JerseyClientBuilder;

/**
* A Factory class containing methods creating an HTTPS client with no
Expand Down Expand Up @@ -71,7 +72,7 @@ public static Client getJerseyHTTPSClientWithValidation() throws KeyManagementEx

private static Client getJerseyHTTPSClient(HostnameVerifier hostnameVerifier) throws KeyManagementException, NoSuchAlgorithmException {
SSLContext sslContext = getSslContext(PROTOCOL);
return ClientBuilder.newBuilder().sslContext(sslContext).hostnameVerifier(hostnameVerifier).build();
return new JerseyClientBuilder().sslContext(sslContext).hostnameVerifier(hostnameVerifier).build();
}

/**
Expand Down

0 comments on commit d69a395

Please sign in to comment.