我尝试用不同的协议(protocol)设置客户端和服务器,并在它们之间发送一些字节。
看起来他们工作得很好。当他们意识到差异时,任何人都可以给我一些关于内部发生的事情的链接吗?像协议(protocol)谈判之类的东西? self 降级?
最佳答案
一旦确定了协议(protocol)版本,它们就无法互操作,但是有一种机制可以在握手开始时协商版本。本质上,客户端在开始握手时通告它支持的最高版本,并且服务器返回它支持的最高版本,该版本小于或等于客户端支持的版本。当然,服务器也可以根据需要禁用这些低版本(在这种情况下不会建立连接)。
TLS specification关于 Server Hello
消息中的 server_version
有这样的说法:
server_version This field will contain the lower of that suggested by the client in the client hello and the highest supported by the server. For this version of the specification, the version is 3.3. (See Appendix E for details about backward compatibility.)
Appendix E.1也应该给你进一步的解释。
关于java - SSLv3 和 TLS(v1、v1.1 或 v1.2)能否协同工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25998381/