.NET 框架中的传输层安全

发布于 2024-12-07 18:05:06 字数 188 浏览 0 评论 0原文

老板问了我一个问题,实际上我找不到任何连贯/全面的答案!

所以我求助于您,StackOverflow 中明智且无所不知的集体:)

今天的问题是“.NET 支持传输层安全版本 1.1 还是 1.2?”谷歌在这个问题上几乎毫无用处,并且那里的文档严重缺乏。

对此的任何帮助将不胜感激。

谢谢你, 克林特

I've been asked a question by the boss and actually I can't find any sort of coherent / comprehensive answer out there!

So I turn to you, the wise and all-knowing collective of StackOverflow :)

The question of the day is "Does .NET support transport layer security version 1.1 or 1.2?" Google is next to useless on this issue and the documentation out there is severely lacking.

Any help on this would be greatly appreciated.

Thank you,
Clint

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

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

发布评论

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

评论(3

抱猫软卧 2024-12-14 18:05:06

Windows 7 中添加了 TLS 1.1 和 1.2 支持,我的理解是 .NET 依赖于 Windows 的 SChannel 来提供 TLS 支持。所以我认为你问题的答案是“取决于操作系统”。

现在您应该记住,大多数站点都由旧版本的 OpenSSL 和其他库提供支持,这些库不仅不支持 TLS 1.1 和 1.2,而且如果从客户端收到 TLS 1.1 支持的指示,还会立即关闭连接。换句话说,如果您在客户端中启用 TLS 1.1 支持,您将无法连接到某些服务器。

更新:忘记提及您可以使用第三方 SSL/TLS 实现(例如我们的 SecureBlackbox 产品中的实现)在您的 .NET 应用程序中获得 TLS 1.x 支持。

TLS 1.1 and 1.2 support has been added to Windows 7 and my understanding is that .NET relies on Windows' SChannel for TLS support. So I think the answer to your question is "depends on the OS".

Now you should remember, that most sites are powered by older versions of OpenSSL and other libraries which not just didn't support TLS 1.1 and 1.2, but closed connection immediately if they received indication of TLS 1.1 support from the client. In other words, if you enable TLS 1.1 support in your client, you won't be able to connect to some of servers.

Upd: Forgot to mention that you can use third-party SSL/TLS implementation (eg. the one in our SecureBlackbox product) to get TLS 1.x support in your .NET application.

洋洋洒洒 2024-12-14 18:05:06

您可以从这里开始记录自己:

通过证书身份验证实现传输安全

本主题讨论对服务器和客户端使用 X.509 证书
使用传输安全时进行身份验证。欲了解更多信息
关于 X.509 证书,请参阅 X.509 公钥证书。
证书必须由证书颁发机构颁发,通常是
证书的第三方颁发者。在 Windows Server 域上,
Active Directory 证书服务可用于颁发
域中客户端计算机的证书。欲了解更多信息
请参阅 Windows 2008 R2 证书服务。在这种情况下,
服务托管在 Internet 信息服务 (IIS) 下,该服务是
配置有安全套接字层 (SSL)。服务已配置
使用 SSL (X.509) 证书允许客户端验证
服务器的身份。客户端还配置了 X.509
允许服务验证身份的证书
客户。服务器的证书必须得到客户端和客户端的信任
客户端的证书必须被服务器信任。实际的
服务和客户端如何验证彼此身份的机制
超出了本主题的范围。欲了解更多信息,请参阅数字
维基百科上的签名。

SslStream 类

...如果服务器需要客户端身份验证,则客户端必须
指定一个或多个证书进行身份验证。如果客户有
不止一个证书,客户可以提供一个
LocalCertificateSelectionCallback 委托来选择正确的
服务器的证书。客户端的证书必须位于
在当前用户的“我的”证书存储中。客户端认证
Ssl2(SSL 版本 2)不支持通过证书
协议。 ...

here some places where you can start to document yourself:

Transport Security with Certificate Authentication

This topic discusses using X.509 certificates for server and client
authentication when using transport security. For more information
about X.509 certificates see X.509 Public Key Certificates.
Certificates must be issued by a certificate authority, which is often
a third-party issuer of certificates. On a Windows Server domain,
Active Directory Certificate Services can be used to issue
certificates to client computers on the domain. For more information
see Windows 2008 R2 Certificate Services. In this scenario, the
service is hosted under Internet Information Services (IIS) which is
configured with Secure Sockets Layer (SSL). The service is configured
with an SSL (X.509) certificate to allow clients to verify the
identity of the server. The client is also configured with an X.509
certificate that allows the service to verify the identity of the
client. The server’s certificate must be trusted by the client and the
client’s certificate must be trusted by the server. The actual
mechanics of how the service and client verifies each other’s identity
is beyond the scope of this topic. For more information see Digital
Signature on Wikipedia.

SslStream Class

... If the server requires client authentication, the client must
specify one or more certificates for authentication. If the client has
more than one certificate, the client can provide a
LocalCertificateSelectionCallback delegate to select the correct
certificate for the server. The client's certificates must be located
in the current user's "My" certificate store. Client authentication
via certificates is not supported for the Ssl2 (SSL version 2)
protocol. ...

千年*琉璃梦 2024-12-14 18:05:06

它可以支持其中之一;支持来自底层 IIS,而不是 .NET。

有关如何启用 TLS 1.2 的详细信息,请参阅此处:http://support.microsoft.com/kb/245030 。请注意,目前只有少数浏览器支持它。

It can support either; the support comes from the underlying IIS, not .NET.

For details on how to enable TLS 1.2, see here: http://support.microsoft.com/kb/245030. Note that currently only a few browsers support it.

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