Skip to content

Fixup to work with mbedtls 3.x #219

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

Merged
merged 2 commits into from
Apr 2, 2025
Merged

Fixup to work with mbedtls 3.x #219

merged 2 commits into from
Apr 2, 2025

Conversation

will-v-pi
Copy link
Contributor

CMake 4.0 has been released, which requires Mbedtls 3.x. This is because Mbedtls 2.x sets a min CMake version of 2.8.12, but CMake 4.0 throws an error if the min version is < 3.5. This is already causing some picotool CI failures, as some runners seem to have the latest CMake (https://github.com/raspberrypi/picotool/actions/runs/14196997735/job/39774407801#step:8:32). This needs updating in the SDK too, see raspberrypi/pico-sdk#2391

The fix is to allow access to the private variables required, and some changed function signatures. This maintains compatibility with mbedtls 2.x using #ifs on the MBEDTLS_VERSION_MAJOR.

Allow access to the private variables required, and some changed function signatures

Maintain compatibility with mbedtls 2.x using #ifs
@will-v-pi will-v-pi added this to the 2.1.2 milestone Apr 1, 2025
@will-v-pi will-v-pi requested a review from kilograham April 1, 2025 14:49
@lurch
Copy link
Contributor

lurch commented Apr 1, 2025

This maintains compatibility with mbedtls 2.x using #ifs on the MBEDTLS_VERSION_MAJOR.

If mbedtls 2.x is EOL, and mbed 3.x is also LTS, do we need to bother maintaining compatibility with mbedtls 2.x? 🤔

@will-v-pi
Copy link
Contributor Author

I think it's best to maintain it for now, so picotool 2.1.x can be built with any SDK 2.1.x

@lurch
Copy link
Contributor

lurch commented Apr 2, 2025

I think it's best to maintain it for now, so picotool 2.1.x can be built with any SDK 2.1.x

Ahhh, perhaps I was wrong to assume that the pico-sdk and pictool versions increment in lock-step? In which case yeah there's obviously no harm in maintaining compatibility with multiple versions.

@will-v-pi
Copy link
Contributor Author

Ahhh, perhaps I was wrong to assume that the pico-sdk and pictool versions increment in lock-step? In which case yeah there's obviously no harm in maintaining compatibility with multiple versions.

They do increment in lock step, but don't necessarily require the latest version of each other - for example picotool 2.1.2 can be built with pico-sdk 2.1.0, if you want the speedups in picotool 2.1.2 but don't want to upgrade your SDK yet. So probably best to maintain compatibility for now.

@lurch
Copy link
Contributor

lurch commented Apr 2, 2025

but don't necessarily require the latest version of each other - for example picotool 2.1.2 can be built with pico-sdk 2.1.0

Ah cool 👍 With all the intertwined PRs in picotool, pico-sdk and pico-examples recently regarding encryption 🔐 , salts 🧂 , etc. I'd falsely assumed that picotool 2.1.2 could only be built with pico-sdk 2.1.2

@will-v-pi will-v-pi merged commit 294ea20 into develop Apr 2, 2025
27 of 35 checks passed
@will-v-pi will-v-pi deleted the mbedtls-3.6 branch April 2, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants