Why does Java's SSLSocket send a version 2 client hello?

后端 未结 1 2038
耶瑟儿~
耶瑟儿~ 2020-11-28 10:37

The SSLSocket.getEnabledProtocols() method returns the following: [SSLv2Hello, SSLv3, TLSv1]. And indeed, when I call connect() and

相关标签:
1条回答
  • 2020-11-28 11:13

    Sun's JSSE doesn't support SSLv2 but it supports the SSlv2ClientHello, to support some SSL servers that require it. You can turn it off by removing it from the enabled protocols.

    IBM's JSSE does support SSLv2 entirely.

    From the JSSE Reference Guide:

    For example, some older server implementations speak only SSLv3 and do not understand TLS. Ideally, these implementations should negotiate to SSLv3, but some simply hangup. For backwards compatibility, some server implementations (such as SunJSSE) send SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet. Some servers do not accept this format, in these cases use setEnabledProtocols to disable the sending of encapsulated SSLv2 ClientHellos.

    I imagine 'server implementations' should read 'SSL implementations' above.

    EDIT: thanks for citing my book!

    0 讨论(0)
提交回复
热议问题