user2600346
user2600346

Reputation: 81

Accessing the Nest api https://developer-api.nest.com results in SSL errors

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

Answers (3)

Nick
Nick

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

Ask4Gilles
Ask4Gilles

Reputation: 61

System.setProperty("https.protocols", "TLSv1");

Upvotes: 0

Terry Simons
Terry Simons

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

Related Questions