ViralLalakia | 2016-09-22 13:55:14 UTC | #1
Hi,
I'm getting an SSL handshake error when I try to connect to the API server ( https://api.mypurecloud.com) from my Java program (I am using Java 6).
The exception is: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
However, I don't face any issues calling the authentication endpoint ( https://login.mypurecloud.com). And, I don't face any issues hitting both endpoint using Postman or browsers.
It seems that I am facing SNI issue as my code is running with Java 6. But, the strange part is the same Java code works for authentication endpoint. Could it be the case that SNI configuration for both servers/domains (login.mypurecloud.com and api.mypurecloud.com) is different? What can be done to solve this issue?
KevinGlinski | 2016-09-22 14:03:53 UTC | #2
have a look at this thread, it is a known issue with Java https://developer.mypurecloud.com/forum/t/ssl-error-connecting-to-api/135
ViralLalakia | 2016-09-22 17:04:40 UTC | #3
Thanks for your reply.
I checked the other topic mentioned here. Java 8 doesn't have the SNI problem. But, in our organization, we have legacy code to support which is written with Java 6. And upgrade to Java 8 is a big task. Can you please suggest any way to connect to APIs with Java 6? Just like I can connect login.mypurecloud.com with Java 6.
On SSL Labes reports, it shows different summary for SNI support for both servers/domains (login.mypurecloud.com and api.mypurecloud.com): login.mypurecloud.com (can be connected with Java 6) - https://www.ssllabs.com/ssltest/analyze.html?d=login.mypurecloud.com&s=52.4.251.128&hideResults=on api.mypurecloud.com (cannot be connected with Java 6 as it works only in clients with SNI support) - https://www.ssllabs.com/ssltest/analyze.html?d=api.mypurecloud.com&s=52.84.213.61&hideResults=on
KevinGlinski | 2016-09-22 17:19:29 UTC | #4
The difference between the two endpoints is the architecture of the back end services. I'm not a java guy myself so i don't know the finer details of things but your best bet is to look into using a different http client like OkHttp or our Java SDK, but I don't know which java versions they support
system | 2017-08-28 19:27:28 UTC | #5
This post was migrated from the old Developer Forum.
ref: 424