如何在。net c#中实现HTTP/2服务器的TLS-ALPN

时间:2021-12-30 04:51:01

does anyone know, how I can implement the TLS-ALPN in .NET?

有人知道我如何在。net中实现TLS-ALPN吗?

I've implemented a basic HTTP/2 server, but without TLS encryption. I searched in google, but I only found resources for C, Java or other languages, but nothing for .NET (C#)

我已经实现了一个基本的HTTP/2服务器,但是没有TLS加密。我在谷歌中搜索过,但是我只找到了C、Java或其他语言的资源,但对。net (c#)没有任何帮助。

1 个解决方案

#1


2  

According to HttpTwo project on Github it is not possible currently because of a bug.

根据Github上的HttpTwo项目,由于一个bug,目前无法实现。

Update: It's not supported in .NET. You can vote for it here: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/6264363-add-support-for-alpn-to-system-net-security-sslstr

更新:在。net中不支持它。你可以在这里投票:https://visualstudio.uservoice.com/forums/121579- visualstudio -2015/建议/ 626463 -add-support-for-alpn-to-system-net-security-sslstr。

quote:

引用:

The HTTP/2 RFC states that secure connections must use ALPN to negotiate the protocol. Unfortunately, .NET's SslStream has no ability to specify application protocols as part of the TLS authentication, so it can't support ALPN. There's an issue tracking this on dotnetfix however it seems like this isn't going to happen very soon (especially on mono and .NET 4.x).

HTTP/2 RFC声明,安全连接必须使用ALPN协商协议。不幸的是,. net的SslStream不能将应用程序协议指定为TLS认证的一部分,因此它不能支持ALPN。在dotnetfix上有一个跟踪这个问题的问题,但是看起来这不会很快发生(特别是在mono和. net 4.x上)。

#1


2  

According to HttpTwo project on Github it is not possible currently because of a bug.

根据Github上的HttpTwo项目,由于一个bug,目前无法实现。

Update: It's not supported in .NET. You can vote for it here: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/6264363-add-support-for-alpn-to-system-net-security-sslstr

更新:在。net中不支持它。你可以在这里投票:https://visualstudio.uservoice.com/forums/121579- visualstudio -2015/建议/ 626463 -add-support-for-alpn-to-system-net-security-sslstr。

quote:

引用:

The HTTP/2 RFC states that secure connections must use ALPN to negotiate the protocol. Unfortunately, .NET's SslStream has no ability to specify application protocols as part of the TLS authentication, so it can't support ALPN. There's an issue tracking this on dotnetfix however it seems like this isn't going to happen very soon (especially on mono and .NET 4.x).

HTTP/2 RFC声明,安全连接必须使用ALPN协商协议。不幸的是,. net的SslStream不能将应用程序协议指定为TLS认证的一部分,因此它不能支持ALPN。在dotnetfix上有一个跟踪这个问题的问题,但是看起来这不会很快发生(特别是在mono和. net 4.x上)。