简体   繁体   English

Windows Server 2016 Standard 上的“无法创建 SSL/TLS 安全通道”——可能是 TLS 1.3 问题?

[英]"Could not create SSL/TLS secure channel" on Windows Server 2016 Standard -- possible TLS 1.3 issue?

I inherited a web app that acts as a corporate dashboard.我继承了一个用作公司仪表板的 web 应用程序。 It's an ASP.NET app.这是一个 ASP.NET 应用程序。 .NET version = 4.7.2 It's running on two Windows 2016 Standard servers running IIS 10. Been in operation for many years. .NET version = 4.7.2 它运行在两个 Windows 2016 标准服务器上运行 IIS 10. 已运行多年。

One of the things the app does is make an HTTP request to a particular https:// URL, grab the data, parse out the JSON, and cache the list of objects.该应用程序所做的其中一件事是向特定的 https://URL 发出 HTTP 请求,获取数据,解析出 JSON,并缓存对象列表。 This has been working for many, many months.这已经工作了很多很多个月。 (Note: the "remote" server we're calling is still "in-house". Another person within my team basically "owns" that.) (注意:我们调用的“远程”服务器仍然是“内部”服务器。我团队中的另一个人基本上“拥有”它。)

Well, on Thanksgiving Weekend, it looks like the Prod App Pool cycled.好吧,在感恩节周末,Prod App Pool 似乎循环了。 And immediately that query started erroring with "System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel."并且该查询立即开始出现错误“System.Net.WebException:请求被中止:无法创建 SSL/TLS 安全通道。”

Myself and a few other folks were paged.我自己和其他几个人都被传呼了。 At the time, we didn't notice (in Event Viewer) that the App Pool had cycled.当时,我们没有注意到(在事件查看器中)应用程序池已经循环。 After a few hours of investigating (and rebooting the app servers), the fellow who "owns" the server we are querying quickly set up a new end point for that same resource...setting it to allow HTTP connections / not require the use of HTTPS. The intention was that this would be a work-around until we could investigate the problem later.经过几个小时的调查(并重新启动应用程序服务器),“拥有”我们正在查询的服务器的人迅速为同一资源设置了一个新的端点...将其设置为允许 HTTP 个连接/不需要使用HTTPS 的目的是,在我们稍后调查问题之前,这将是一种解决方法。

Well, it's now "later".好吧,现在是“以后”。

The remote server that we are calling appears to require the use of TLS 1.3.我们调用的远程服务器似乎需要使用 TLS 1.3。 I confirmed this by using both Firefox and Chrome on my own laptop to pull up a couple of https: urls on that server.我通过在我自己的笔记本电脑上同时使用 Firefox 和 Chrome 在该服务器上提取几个 https: 网址来确认这一点。

So, Ah-ha, I thought to myself, I had found information earlier this afternoon suggesting that Windows Server 2016 Standard didn't support the use of TLS 1.3!所以,啊哈,我心想,我今天下午早些时候发现信息表明 Windows Server 2016 Standard 不支持使用 TLS 1.3! ( https://learn.microsoft.com/en-us/windows/win32/secauthn/protocols-in-tls-ssl--schannel-ssp-#tls-protocol-version-support ) ( https://learn.microsoft.com/en-us/windows/win32/secauthn/protocols-in-tls-ssl--schannel-ssp-#tls-protocol-version-support )

But then I remembered: Earlier, I had been able to pull up those https: URLs in Chrome while logged onto my app's webservers, Sure enough.但后来我想起来了:早些时候,我已经能够在登录到我的应用程序的网络服务器时在 Chrome 中提取那些 https: URL,果然如此。 I went over there and retested with Firefox and Chrome.我去了那里,用 Firefox 和 Chrome 重新测试了。 Both said the connections they'd made were using TLS version 1.3 !!两人都说他们建立的连接使用的是 TLS 1.3 版!!

So, what the????那么,什么???? That makes it seem like Windows Server 2016 Standard DOES support TLS 1.3???这使得它看起来像 Windows Server 2016 Standard DOES support TLS 1.3???

And, from everything I've read, since my app is using .NET version 4.7.2, it should default to using whatever the default protocol for the OS is.而且,从我读过的所有内容来看,由于我的应用程序使用的是 .NET 版本 4.7.2,因此它应该默认使用操作系统的任何默认协议。 So, shouldn't it too be using TLS 1.3?那么,它不应该也使用 TLS 1.3 吗? Why the heck can't it make a connection?为什么他妈的不能建立联系?

I'm certainly needing some direction on what to do next.我当然需要一些关于下一步该做什么的指导。

Thanks!谢谢!

Background背景

Many statements from your question body above are true, but you need to put the contents into contexts so as to get the whole picture.上面问题正文中的许多陈述都是正确的,但是您需要将内容放入上下文中才能了解全貌。

First, Chrome/Firefox supports TLS 1.3, but that support comes from the crypto libraries (many options out there, Mozilla NSS, OpenSSL and so on) they ship with themselves, not from Windows native crypto API.首先,Chrome/Firefox 支持 TLS 1.3,但这种支持来自加密库(有很多选项,Mozilla NSS,OpenSSL 等),它们自己提供,而不是来自 Windows 本机加密 API。

Second, like you found out, Windows Server 2016 does not support TLS 1.3 natively because its underlying crypto API lacks of TLS 1.3 support.其次,正如您发现的那样,Windows Server 2016 本身不支持 TLS 1.3,因为其底层加密 API 缺乏 TLS 1.3 支持。 TLS 1.3 support is only included in Windows Server 2022 at this moment (and whether it will be back ported to previous Windows versions is unknown). TLS 1.3 支持目前仅包含在 Windows Server 2022 中(是否会向后移植到以前的 Windows 版本未知)。

Third, when you try to analyze Windows components (like .NET Framework) or products, you need to identify what they rely on to perform TLS, Windows native crypto API or their own dependencies (like Chrome/Firefox does).第三,当您尝试分析 Windows 组件(如 .NET 框架)或产品时,您需要确定它们执行 TLS、Windows 原生加密 API 或它们自己的依赖项(如 Chrome/Firefox 所做的)所依赖的内容。

Answer to your specific ASP.NET question回答您的特定 ASP.NET 问题

Sadly it is well known that BCL classes in .NET Framework rely on Windows native crypto API, so on Windows Server 2016 you can go with TLS 1.2 at most.遗憾的是,众所周知,.NET 框架中的 BCL 类依赖于 Windows 本机加密 API,因此在 Windows Server 2016 上,您最多可以使用 TLS 1.2 go。

If your application needs TLS 1.3 badly, you need to upgrade to Windows Server 2022, or switch to a third party crypto API.如果您的应用程序非常需要 TLS 1.3,则需要升级到 Windows Server 2022,或切换到第三方加密 API。

Reference参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法创建SSL / TLS安全通道-GetRequestStream() - Could not create SSL/TLS secure channel - GetRequestStream() TLS 1.2错误无法创建SSL / TLS安全通道 - TLS 1.2 error Could not create SSL/TLS secure channel XmlReader.Create错误“无法创建SSL / TLS安全通道” - XmlReader.Create error “Could not create SSL/TLS secure channel” 无法创建SSL / TLS安全通道。 -Cdyne回传 - Could not create SSL/TLS secure channel. - Cdyne Postback ASP.NET,HttpWebRequest和“无法创建SSL / TLS安全通道” - ASP.NET, HttpWebRequest and “Could not create SSL/TLS secure channel” WebException:请求已中止:无法创建SSL / TLS安全通道 - WebException: The request was aborted: Could not create SSL/TLS secure channel HttpWebRequest:请求已中止:无法创建SSL / TLS安全通道 - HttpWebRequest: The request was aborted: Could not create SSL/TLS secure channel 请求被中止:无法创建 SSL/TLS 安全通道 - The request was aborted: Could not create SSL/TLS secure channel Braintree 中的“请求被中止:无法创建 SSL/TLS 安全通道”错误 - "The request was aborted: Could not create SSL/TLS secure channel" error in Braintree RestSharp 请求中止 - 无法创建 SSL/TLS 安全通道 - RestSharp request aborted - could not create SSL/TLS secure channel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM