This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

 
john kerl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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..
 
Abhi Trivedi
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
To better understand the problem you might want to enable ssl trace on your client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic