0
  1. I have enabled TLSv1.2 in my server (View site information says 'Not Secure with red caution icon')

  2. And I'm using the following code to connect from Java class

    Client client = ClientBuilder.newClient();
    WebTarget authTarget = client.target(restResource).path(path);
    Invocation.Builder invocationBuilder = authTarget.request(MediaType.APPLICATION_JSON);
    Response response = invocationBuilder.post(Entity.entity(null,MediaType.APPLICATION_JSON_TYPE));
    

I receive the following exception.

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

What am I missing here, I'm new to https connection.

James Z
  • 12,209
  • 10
  • 24
  • 44
gauti
  • 527
  • 1
  • 6
  • 16
  • what client are you using? If it's the default one you have to set in your `ClientBuiler` all the ssl related things (https://docs.oracle.com/javaee/7/api/javax/ws/rs/client/ClientBuilder.html) – Edwin Jan 18 '18 at 10:58
  • I'm using javax.ws.rs.client.ClientBuilder; Please mention what are the ssl related things I should add. – gauti Jan 18 '18 at 12:50
  • use the java docs and check this too https://stackoverflow.com/questions/2145431/https-using-jersey-client – Edwin Jan 18 '18 at 12:52

0 Answers0