• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SSLHandshakeException: handshake_failure, logging proper reason for handshake failure

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using HttpURLConnection to connect to a server. I was running into a situation where the handshake failure happened due to the mismatching protocols. Server supported TLS where as client was apparently using SSLv3. When I forced the client to use TLS (as shown in the code below - line#2), the connection succeeded returning expected results.
However, I would like to log the reason for failure correctly if this situation was to happen again.

Is there a way where programmatically I can get the server's lowest and client's highest supported version for logging. Also it would be great if someone could point a way to get the reason for handshake failure in the code for logging.



 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic