Skip to content

crypto/mbedtls: Add support for mbedtls 3.x #2112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

vikramdattu
Copy link
Contributor

@vikramdattu vikramdattu commented Apr 15, 2025

  • Also clone mbedtls 3.6.x instead of 2.8.x to match with rainmaker's version

Issue #, if available:

What was changed?

mbedtls version is updated to 3.x

Why was it changed?

2.x has reached its end of life and is not maintained anymore

How was it changed?

Support was added to the sources to support mbedtls 3.x under version check
The CMake dependency updated

What testing was done for the changes?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@unicornss unicornss added the dependency Related to a dependency label Apr 15, 2025
@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch from 38fbb72 to 97740cd Compare May 13, 2025 05:53
@vikramdattu vikramdattu changed the base branch from main to release-v1.12.1 May 13, 2025 05:55
@vikramdattu
Copy link
Contributor Author

@unicornss @sirknightj please start reviewing this change.

@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch from 97740cd to 49c15c3 Compare May 14, 2025 17:10
@sirknightj sirknightj changed the base branch from release-v1.12.1 to develop May 14, 2025 20:19
Copy link
Contributor

@sirknightj sirknightj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor suggestions. Changes look good overall, please take a look at the CI.

@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch 2 times, most recently from a762bed to a36b94f Compare May 15, 2025 10:11
@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch 4 times, most recently from 455832f to a3dfa88 Compare May 19, 2025 12:20
@vikramdattu vikramdattu requested a review from sirknightj May 19, 2025 12:20
@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch 3 times, most recently from 5fb85ba to e2ef4c2 Compare May 20, 2025 16:44
 - mbedtls 2.8.x is getting out of support: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-2.28.10
 - Clone mbedtls 3.6.x instead of 2.8.x via CMake dependencies
 - Add related code to mbedtls usage keeping the 2.8.x support intact under mbedtls version macros
@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch from e2ef4c2 to f5d3bc5 Compare May 21, 2025 13:01
Copy link
Contributor

@stefankiesz stefankiesz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some unused files to remove, otherwise looks good!

 - This release handles mbedtls_3.x version support and has some fixes
 - Cleanup: removed libwebsocket patches as they are not needed anymore
 - New API tlsSessionStartWithHostname can receive optional hostname and set the same
 - It is recommened to set the hostname and is on by default for mbedtls v3.6.3 and above
 - Since we receive ICE server credentials via secure API and anyway are use DTLS as WebRTC standard,
 we could skip this, but let's follow the recommendation as precaution
 - Newer(3.6.x) mbedtls versions does not test builds on GCC versions as old as 4.4
 - We keep this test for older mbedtls version (2.28.x)
@vikramdattu vikramdattu force-pushed the support/mbedtls_3.x branch from f5d3bc5 to 875d520 Compare May 22, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Related to a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants