SslStream.AuthenticateAsServer 证书链
SslStream.AuthenticateAsServer certificate chain
是否可以使用证书链作为服务器连接到客户端?
clientStream.AuthenticateAsServerAsync(certificate, false, System.Security.Authentication.SslProtocols.Tls, false).Wait();
我只是尝试使用自签名证书链连接到客户端,但没有成功。 SslStream 实例 AuthenticateAsServer 的方法只有一个证书作为参数。但是浏览器要求 additional root certificate。
你有什么想法或代码示例吗?
链不发送根,因为 A) 您已经拥有它,所以它对您的根存储是多余的;或 B) 你不相信,在这种情况下你不会相信它,那何必呢?
certificate_list:
This is a sequence (chain) of certificates. The sender's
certificate MUST come first in the list. Each following
certificate MUST directly certify the one preceding it. Because
certificate validation requires that root keys be distributed
independently, the self-signed certificate that specifies the root
certificate authority MAY be omitted from the chain, under the
assumption that the remote end must already possess it in order to
validate it in any case.
SslStream class 将发送服务器身份证书,后跟任何它知道的中间件,但不会发送根证书(当然,除非服务器身份证书是自签名的)。
通常不受信任的根可以通过他们写入 child/intermediate CA 的授权信息访问记录来查找。如果您没有 AIA 或无法访问端点,则必须通过不同的机制将根传输到客户端计算机。
是否可以使用证书链作为服务器连接到客户端?
clientStream.AuthenticateAsServerAsync(certificate, false, System.Security.Authentication.SslProtocols.Tls, false).Wait();
我只是尝试使用自签名证书链连接到客户端,但没有成功。 SslStream 实例 AuthenticateAsServer 的方法只有一个证书作为参数。但是浏览器要求 additional root certificate。 你有什么想法或代码示例吗?
链不发送根,因为 A) 您已经拥有它,所以它对您的根存储是多余的;或 B) 你不相信,在这种情况下你不会相信它,那何必呢?
certificate_list: This is a sequence (chain) of certificates. The sender's certificate MUST come first in the list. Each following certificate MUST directly certify the one preceding it. Because certificate validation requires that root keys be distributed independently, the self-signed certificate that specifies the root certificate authority MAY be omitted from the chain, under the assumption that the remote end must already possess it in order to validate it in any case.
SslStream class 将发送服务器身份证书,后跟任何它知道的中间件,但不会发送根证书(当然,除非服务器身份证书是自签名的)。
通常不受信任的根可以通过他们写入 child/intermediate CA 的授权信息访问记录来查找。如果您没有 AIA 或无法访问端点,则必须通过不同的机制将根传输到客户端计算机。