This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes java.lang.RuntimeException: peer not authenticated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java.lang.RuntimeException: peer not authenticated" Watch "java.lang.RuntimeException: peer not authenticated" New topic

java.lang.RuntimeException: peer not authenticated

john kerl

Joined: Jul 29, 2011
Posts: 13
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: 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

Joined: Oct 25, 2011
Posts: 4
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

Joined: Oct 25, 2011
Posts: 4
To better understand the problem you might want to enable ssl trace on your client.
I agree. Here's the link:
subject: java.lang.RuntimeException: peer not authenticated
It's not a secret anymore!