为什么 TLS 1.0 客户端和 SSL 3.0 服务器之间握手失败?

发布于 2024-10-26 23:43:25 字数 307 浏览 5 评论 0原文

有一个项目广泛使用 JSSE。

根据配置参数,SSLContext 会针对 SSLv3 进行初始化。这意味着如果未设置该参数,则为 SSLv3,否则为 TLS

我偶尔注意到一些握手失败并进行了跟踪:如果客户端协商了 TLS 并且服务器用 SSLv3 回复,则握手失败

为什么会发生这种情况?我认为 TLS 和 SSLv3 几乎可以互换。 他们不是吗?如果我将服务器端更改为始终回复 TLS ,我是否有可能会破坏某些内容?

There is a project that uses extensively JSSE.

Depending on a configuration parameter the SSLContext is initialized for SSLv3. Meaning that if the parameter is not set it is SSLv3, otherwise it is TLS.

I noticed some handshake failures occasionally and traced it: If the client negotiated TLS and the server replied with SSLv3, the handshake failed

Why does this happen? I thought that TLS and SSLv3 are pretty much interchangeable.
Are they not? If I change server side to always reply TLS is there a chance I will break something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花想c 2024-11-02 23:43:25

TLS 1.0 在内部是 SSL 3.1。客户端和服务器可以接受使用其中一个或两者;在握手期间,客户端发送它所知道的最高协议版本,服务器应该选择它支持的最高版本,该版本并不总是比客户端发送的版本更新。

我的猜测是,当您将客户端配置为使用 TLS 时,客户端会将其理解为“仅使用 TLS 1.0”:客户端发送“3.1”,并且如果服务器配置为响应“ 3.0”,那么客户端将很逻辑地拒绝连接。

您应该做的是找到一种方法来配置服务器以接受 3.0 和 3.1,从而使用客户端宣布的任何协议版本。或者,配置客户端以声明它知道 3.1,但如果服务器这么说,它也接受“降级”到 3.0。

TLS 1.0 is, internally, SSL 3.1. A client and a server may accept to use either or both; during the handshake, the client sends the highest protocol version it knows of, and the server should select the highest version that it supports that is not always newer than the one sent by the client.

My guess is that when you configure your client to use TLS, then the client understands it as "use only TLS 1.0": the client sends "3.1", and if the server is configured to respond with "3.0", then the client will quite logically reject the connection.

What you should do is find a way to configure the server to accept both 3.0 and 3.1, and thus use whatever protocol version was announced by the client. Alternatively, configure the client to declare that it knows 3.1, but such that it also accepts a "downgrade" to 3.0 if the server says so.

莳間冲淡了誓言ζ 2024-11-02 23:43:25

您没有说明您想通过改变协议参数来实现什么目的。 SSLv3 和 TLS1.0 非常相似但又不同的协议。 SSLv3中引入的协议协商机制也被用于后续协议中。最重要的是,在 SSLContext.getInstance("proto"); 中,您应该将 proto 设置为您愿意支持的 SSL 协议的最早版本。之后,对等方将协商使用他们都支持的协议的最新版本。

You don't say what you are trying to achieve by varying the protocol parameter. SSLv3 and TLS1.0 are very similar but nevertheless distinct protocols. The protocol negotiation mechanism introduced in SSLv3 is also used in subsequent protocols. The bottom line is that in SSLContext.getInstance("proto"); you should set proto to the earliest version of the SSL protocol you are willing to support. After that, the peers will negotiate to use the newest version of the protocol they both support.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文