javax.net.ssl.SSLException invalid_parameter bouncycastle 相关吗?

发布于 2024-08-02 04:13:08 字数 534 浏览 1 评论 0原文

我正在尝试从 BouncyCastle bcprov-jdk14-124.jar (oooold) 升级到 bcprov-jdk14-143.jar。 当我用新 jar 替换旧 jar 并构建所有内容时,我的软件将不再建立 SSL 连接,并失败并显示 javax.net.ssl.SSLException: Received fatalalert:illegal_parameter。 谷歌搜索“bouncycastle javax.net.ssl.SSLException非法_参数”会产生多达 4 个结果。

关于从哪里开始调试有什么建议吗?

其他上下文:

  • 客户端位于
  • CentOS 上的 WinXP 服务器上,使用 Oracle 应用服务器
  • 客户端正在尝试为 AXIS2 POST 建立 SSL 连接。
  • 当服务器使用bcprov-jdk14-143并且客户端使用bcprov-jdk14-124时,POST成功,但是当客户端升级到143时,出现此错误

I'm trying to upgrade from BouncyCastle bcprov-jdk14-124.jar (oooold) to bcprov-jdk14-143.jar. When I replace the old jar with the new jar and build everything, my software will no longer establish an SSL connection, failing with a javax.net.ssl.SSLException: Received fatal alert: illegal_parameter. Googling for "bouncycastle javax.net.ssl.SSLException illegal_parameter" yields a whopping 4 results.

Any suggestions on where to start debugging this?

Additional context:

  • client is on WinXP
  • server on CentOS, using Oracle Application Server
  • The client is attempting to establish an SSL connection for an AXIS2 POST.
  • When the server uses bcprov-jdk14-143 and the client uses bcprov-jdk14-124, the POST succeeds, but when the client is upgraded to 143, I get this error

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

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

发布评论

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

评论(1

落墨 2024-08-09 04:13:08

我对你的设置有点困惑。您的错误来自 JSSE,但 BC 不提供 JSSE。我假设错误来自使用 SunJSSE 的服务器。您可能从客户端使用 BC 的 TLS API 来建立 TLS 连接(检查您是否有 TlsProtocolHandler)。

如果是这样的话,在 Java 1.4 上让一切正常工作已经是一个奇迹,我不会升级任何东西。在 Java 5 之前,Sun 的 JSSE 部分硬连接到 SunJCE,因此您实际上在服务器上同时使用 2 个 JCE。我之前玩过 BC 的 TLS,但从来没有让它工作过,所以你比我领先:)

为什么你需要升级 BC?在我看来,如果您使用的是 Java 1.4 或更高版本,则根本没有理由使用 BC。但是,如果您使用 TlsProtocolHandler,则需要更改代码才能将其删除。

具体错误是由服务器下发压缩方法列表引起的。没有办法解决这个问题。没有人支持压缩,但他们都只用 Null 方法发送一个列表。

I am a little bit confused about your setup. Your error is from JSSE but BC doesn't provide JSSE. I assume the error is from server, which uses SunJSSE. You probably use BC's TLS API from client to make the TLS connection (check if you have TlsProtocolHandler).

If this is the case, getting everything working is already a miracle on Java 1.4, I wouldn't upgrade anything. Before Java 5, Sun's JSSE is partially hard-wired to SunJCE so you are practically using 2 JCEs at the same time on the server. I played with TLS from BC before and I never got it working so you are way ahead of me :)

Why do you need to upgrade BC? In my opinion, there is no reason to use BC at all if you are on Java 1.4 or later. However, it requires code changes to remove it if you use TlsProtocolHandler.

The specific error is caused by server sending down a list of compression methods. There is no way to get around that. Nobody supports compression but they all send down a list with only Null method.

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