c# - RemoteCertificateNotAvailable - 身份验证期间未通过根证书

标签 c# java certificate tomcat7 trust

我目前遇到一个问题,一个作为 Windows 服务安装的 .Net 应用程序与另一个用 Java 编写的应用程序对话,该应用程序在 Apache Tomcat 7 中运行,在 Windows Server 2008 上运行。

.NET 应用程序作为 Windows 服务运行,并使用 TcpListener 和来自本地计算机个人存储的服务器证书(根证书和中间证书存在于本地计算机的相应证书存储中)进行保护,它提供到 Java 应用程序,然后它应该提供客户端证书来保护连接。

此过程中使用的所有证书都是从我们公司的 CA 创建的,并且 Java 应用程序已将证书添加到它引用的 keystore 和信任库中。

当 Java 应用程序尝试打开与 .NET 服务的连接时,连接失败。

我们在 .Net 应用程序中打开了跟踪,它报告说这是由于“远程服务器没有提供证书”。然后我们为 Apache Tomcat 服务打开 SSL 调试,它似乎进入了服务器(在本例中为 .Net Windows 服务)通过传递机器中的所有根证书从客户端请求证书的阶段信任库,但是我添加的根证书没有出现在根证书列表中。

我可以在本地机器信任库中看到证书,所以我不确定下一步该做什么。什么会阻止我们自己的根证书出现在 Java 应用程序的证书颁发机构列表中?

最佳答案

我的一所大学在 Windows 事件日志中发现了一个条目,指出由于有许多可用的根证书,受信任的根证书列表已被截断。一旦我们删除了所有不需要的,它就起作用了。

更新: 来自 Windows 事件日志的消息如下所示:

When asking for client authentication, this server sends a list of trusted certificate authorities to the client. The client uses this list to choose a client certificate that is trusted by the server. Currently, this server trusts so many certificate authorities that the list has grown too long. This list has thus been truncated. The administrator of this machine should review the certificate authorities trusted for client authentication and remove those that do not really need to be trusted.

另请参阅:http://support.microsoft.com/kb/2801679

关于c# - RemoteCertificateNotAvailable - 身份验证期间未通过根证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14523559/

相关文章:

c# - 如何获取本地Windows帐户的到期日期?

java - 绘图仪 : What is fixed - the height or the width

java - 何时使用静态方法

java - Gson 和抽象父类(super class) : deserialization issue

ssl - 对于需要支持过时系统的网站,Letsencrypt 不再是一种选择,对吧?

android - 果冻 bean 的客户端证书错误

c# - WPF 验证错误 : How to show in separate TextBlock, 不在工具提示中

c# - 访问重写的方法

c# - 检查 argumentSyntax 是否可以通过具有 IParameterSymbol 的方法调用

sql - 执行此操作之前,请在数据库中创建主 key 或在 session 中打开主 key