带SSL流的UDP(UDP with SSL Stream)

编程入门 行业动态 更新时间:2024-10-28 16:25:51
SSL流的UDP(UDP with SSL Stream)

嗨,我正在使用C#进行服务器/客户端项目,它使用TCP(用于登录和其他东西)和UDP(用于流语音)。 问题是我需要使用sslStream用于UDP,但据我所知,它不可能使用无保证协议进行SSL身份验证。 那么无论如何使用TCP进行身份验证然后使用sslStream进行UDP?

Hi I'm working on server/Client project with C# that uses both TCP (for logging in and other stuff) and UDP (for streaming voice ). The problem is that I need to use sslStream for UDP but as far as I know its not possible to make SSL authentication with unguaranteed protocol. So is there anyway to make the authentication using TCP then use the sslStream for UDP?

最满意答案

不太了解C#和sslStream,但是:UDP是一种数据报协议,它不保证数据包传递,订单甚至可能导致重复传递。 TCP代替是一种保证传送等的流协议.TLS只能在TCP之类的协议之上工作,而不能在UDP之上工作。

对于UDP,您需要使用DTLS。 根据Wikipedia ,Microsoft TLS Stack SChannel支持自Windows 7和Windows 2008 R2以来的DTLS 1.0。 但是在搜索C#DTLS时会出现很多问题,但没有任何内容表明存在对CLS的DTLS的原生支持。 但是一些第三方图书馆出现在这个搜索中,可能有助于解决您的问题。

Not knowing much about C# and sslStream, but: UDP is a datagram protocol and it does not guarantee that packet delivery, order and even can cause duplicate delivery. TCP instead is a stream protocol which guaranteed delivery etc. TLS works only on top of a protocol like TCP and not on top of UDP.

For UDP you would need to use DTLS instead. According to Wikipedia the Microsoft TLS Stack SChannel support DTLS 1.0 since Windows 7 and Windows 2008 R2. But when searching for C# DTLS lots of questions show up but nothing which would indicate that there is native support for DTLS with C#. But some third party libraries show up in this search which might help with your problem.

更多推荐

本文发布于:2023-07-27 14:05:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1291498.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SSL   UDP   Stream

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!