jsse handshake_failure on public https web site

淺唱寂寞╮ 提交于 2019-11-28 23:15:02

There is your setting:

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

You were correct - it's the SSL version that causes the problem. Here is some sort of explanation.

Congratulations for the nice and well researched question!

I connected with FF 3.6 to that website and sniffed the connection with Wireshark. Indeed, the first SSL connection attempt sends an TLS1.0 client hello and the server responds with a handshake failure, then FF3.6 immediately retries using the SSLv2 compatible hello which succeeds. All this happens transparently to the user so you don't notice the initial failure. Try setting the system property https.protocols to SSLv2Hello. Note that the JSSE does not support SSL v2, this is just the format of the initial client hello.

EDIT:

Well, never mind, I see that JSSE uses by default the SSLv2 client hello. I don't know why the first connection attempt failed. Maybe you just have to try twice in a row.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!