Tried to set HostnameVerifier on ClientBuilder - does not work :-( Here is
the code snippet:
ClientBuilder clientBuilder = ClientBuilder.newBuilder();
clientBuilder.hostnameVerifier(new HostnameVerifier(){
public boolean verify(String hostname, SSLSession sslSession) {
return true;
}
});
Client client = clientBuilder.newClient();
//Client client = ClientBuilderImpl.newClient();
String urlHost = "https://" + centralNode;
WebTarget target =
client.target(urlHost).path(BASE_SERVICE_URL);
String encodedpw = Base64.encodeBase64String(passwd.getBytes());
String body = "{\"uid\" : \"" + uid + "\",\"password\": \"" +
encodedpw +
"\"}";
Invocation.Builder builder =
target.request(MediaType.APPLICATION_JSON);
Response res = builder.post(Entity.entity(body,
MediaType.APPLICATION_JSON));
Still getting Common Name mismatch exception.
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-3-0-4-client-how-to-disable-CN-checking-tp5755938p5756092.html
Sent from the cxf-user mailing list archive at Nabble.com.