• 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

Java SSLHandshakeException issue

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In an attempt to debug this SSL issue that came up on one of our servers recently I wrote a very simple program to connect to an SSL site in our intranet.



This code fails with SSLHandshakeException on one of our servers, but the same exact code works without issue on another server. I ran the programs with SSL debugging enabled and here are results of each server

**WORKING SERVER - SLES 11.3, Java IBM 1.6.0 64-bit**



**NOT WORKING SERVER: Windows 7, Java JDK 1.6.0_39**



Does anyone have any ideas on what I can do to get this simple code working on my Windows 7 machine? I have been at this all day and pretty lost at this point. Thanks for any help!

Also, the URL for the server is accessible without issue when viewing from the web browser on both machines. It appears just when I try to connect over Java that I have issues.
 
Greenhorn
Posts: 1
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raymond, first of all: sorry for my bad english.
Generally you have to provide a TrustStore to Java, which contains your public server-certificate.
if the connection works in your browser you can see all trusted certificates there an download the one you need.

Java normaly uses the truststore %java_Home%\lib\security\cacerts.
With "keytool -list", you can check if this truststore includes the needed certificate.
if not, you have to add it.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic