moonlight-stream / moonlight-common-c

Core implementation of Nvidia's GameStream protocol
GNU General Public License v3.0
458 stars 167 forks source link

Use new mbedtls APIs #75

Closed mariotaku closed 1 year ago

mariotaku commented 1 year ago

I also have a unit test for this change. If you want to integrate some tests please let me know.

cgutman commented 1 year ago

This new API seems much more complex and inefficient for our usecase than the existing API.

What's the advantage of this over the existing API?

mariotaku commented 1 year ago

On Ubuntu 22.04 and up, mbedtls-2.27 (or 2.25?) marked the old function as deprecated, causes tests to fail. And for mbedtls-3.x, the old function was completely removed.

I have looked into the source code and used a much better approach to do encryption, this time it should be as efficient & simple as the old one.