SSL 证书升级导致问题

发布于 2024-10-27 09:41:56 字数 612 浏览 1 评论 0原文

我们正在与远程服务器对话以验证用户身份。 Web 服务器使用由 Verisign 签名的 SSL 证书。数据通过 HTTP 进行交换,并且我们已将 ThreadSafeClientConnManager 配置为使用 JVM 默认 SSL 工厂:

SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", PlainSocketFactory
                .getSocketFactory(), 80));
schemeRegistry.register(new Scheme("https", SSLSocketFactory
                .getSocketFactory(), 443));
ClientConnectionManager manager = new ThreadSafeClientConnManager(
                sDefaultHttpParams, schemeRegistry);

最近,Web 服务器更新了其 SSL 证书,这导致我们的应用程序崩溃。我们可以做什么来避免这个问题呢?

请帮忙。

We are talking to a remote server for authenticating a user. The web server uses a SSL certificate signed by Verisign. The data is exchanged over HTTPs and we have configured our ThreadSafeClientConnManager to use the JVM default SSL factory:

SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", PlainSocketFactory
                .getSocketFactory(), 80));
schemeRegistry.register(new Scheme("https", SSLSocketFactory
                .getSocketFactory(), 443));
ClientConnectionManager manager = new ThreadSafeClientConnManager(
                sDefaultHttpParams, schemeRegistry);

Recently, the web server updated their SSL certificates and this has caused our application to break. What can we do to avoid this problem?

Please help.

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

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

发布评论

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

评论(1

夜清冷一曲。 2024-11-03 09:41:56

您实际上无法采取任何措施来“避免”该问题,因为它并不是真正的问题,它是 SSL 证书和权威信任的核心“功能”。

这是一个相当广泛的问题,更多细节可以帮助查明确切的问题,但这里是首先要检查的两件事。

  1. 他们升级 SSL 证书以使用哪个 CA?是自签名的吗?
    如果站点已升级为使用使用非标准根证书颁发机构的 SSL 证书,则您需要使用 keytool 导入特定的 SSL 证书,以告诉本地 JVM 该证书是可信的。如果他们使用新的证书颁发机构(并且您的组织信任该根证书颁发机构),那么您可能需要导入新的根证书颁发机构,默认情况下支持大多数专业,但我有时被迫导入新的证书颁发机构。

http://download.oracle.com/javase/1.4 .2/docs/tooldocs/windows/keytool.html

  1. 确保他们的证书正确链接。我见过的第二个最常见的问题是站点管理员的证书链(安装)。不幸的是,IE/Mozilla/Java...都使用不同的验证机制来确保 SSL 证书“有效”,而且我发现许多站点管理员不知道如何将证书正确链接到其站点上适当的根权限。您应该在浏览器中打开证书(我会在多个浏览器中打开它)并检查信任链,以确保证书链从站点一直返回到预期的根 CA。 (这也是您检查 #1 的根 CA 的方法)。如果它没有信任链,那么 JVM SSL 验证将失败(而我已经看到 Internet Explorer 在旧版本的 IE 中将非链式证书称为“有效”)。

There is nothing you can really do to "avoid" the problem because it isn't really a problem, it is a core "feature" of SSL certificates and authority trust.

This is a pretty broad question, more detail could help pinpoint the exact problem, but here are the first 2 things to check.

  1. What CA did they upgrade their SSL cert to use? Is it self-signed?
    If the site has been upgraded to use an SSL cert that either uses a non-standard root certificate authority then you need to either import the specific SSL cert using keytool to tell your local JVM that the cert is trusted. If they are using a new authority (and your organization trusts that root authority) then you may need to import a new root certificate authority, most majors are supported by default but I have been forced to import new ones on occasion.

http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/keytool.html

  1. Make sure their cert is chained correctly. The 2nd most common problem I have seen is cert chaining (install) by the site admins. Unfortunately IE/Mozilla/Java... all use different validation mechanisms to make sure SSL certs are "valid" and I have found that many site admins don't know how to properly chain a cert to the appropriate root authority on their site. You should open the cert in a browser (I would open it in multiple) and inspect the chain of trust to make sure the cert chains from the site all the way back up to the expected root CA. (This is also how you can check the root CA for #1). If it does not have a chain of trust then the JVM SSL validation will fail (whereas I have seen Internet Explorer call a non-chained cert "valid" in older versions of IE).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文