Error Messages: javax.net.ssl.SSLHandshakeException

Hello.
my smartapp used to work fine until today.
Now I’m getting

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

error messages.

I use smappee API, and I have tested that the smappee API work great from their side. I can perform OAuth 2.0 authentication and perform GET requests normally, but the smartapp does not work.

When I’m trying to install the smartapp from scratch, in the receivetoken phase, I’m getting this error instead.

Is it something changed on ST?
Can you please assist?

Some parts of the code that I’m getting the errors are:

def tokenParams = [
        grant_type  : "authorization_code",
        code        : state.sampleAccessCode,
        client_id   : clientId,
        client_secret: clientSecret,
        redirect_uri: "https://graph-eu01-euwest1.api.smartthings.com/api/token/${state.accessToken}/smartapps/installations/${app.id}/receiveToken"
]

def tokenUrl = "https://farm1pub.smappee.net/dev/v1/oauth2/token?${toQueryString(tokenParams)}"
log.debug "url to get tokens: $tokenUrl"
try {
    httpGet(uri: tokenUrl) { resp ->  #generate javax.net.ssl.SSLHandshakeException error.
}

AND

  def deviceLocationsParams = [
            uri: "https://farm1pub.smappee.net",
            path: "/dev/v1/servicelocation",
            headers: ["Authorization": "Bearer ${state.authToken}"]
    ]

    httpGet(deviceLocationsParams) { resp ->   #generate javax.net.ssl.SSLHandshakeException error.

}

Tagging @nayelyz :slight_smile:

1 Like

Tagging @erickv

You may want to check your server and what handshake protocols it uses. It should use TLS 1.2 or TLS 1.1 only which is what is supported by ST at this time.

1 Like

Is there any workaround from ST side?

The only thing you can do is provide a list of protocols for ST to use (SSL 3.0, TLS 1.1 and TLS 1.2) (which I believe are all enabled by default). The rest is up to your server side.