• 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.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

When I am trying to connect to a thrid party api, using https protocol, I am getting the error as "java.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated". But when i am doing the same with http protocol, it is working fine. Can anybody please suggest me on this..
 
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we use HTTPS protocol, the server sends back its certificate which then gets verified with the trusted certs at client side. In HTTP connection this does not happen, which is why it works in your case.
I think in your case your client machine might not have server's cert as a trusted cert. Check your keystore.
 
Abhi Trivedi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To better understand the problem you might want to enable ssl trace on your client.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic