Reputation: 81
When accessing the Nest API from my java app to return the devices, I'm getting the following error:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
The same URL (of the form)
https://developer-api.nest.com/devices?auth=<access_token_ommited_here>
Works fine from my browser. I suspect I'm missing a cert. Does anyone know how to resolve this issue?
Upvotes: 1
Views: 329
Reputation: 71
I had to use TLSv1.1 to avoid strange SSL behaviour, the initial request would setup SSL correctly, but subsequent requests to the 307 redirected URL would fail SSL. Not 100% it is working perfectly yet but seems to be more stable.
System.setProperty("https.protocols", "TLSv1.1");
Upvotes: 1
Reputation: 51
Ensure that your SSL library is using TLSv1 or higher security. If it's defaulting to SSLv3 or lower, the server will reject the connection.
Upvotes: 3