openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[build] support mbedtls 3.x #249

Closed wgtdkp closed 4 months ago

wgtdkp commented 5 months ago

This PR adds support for building with mbedtls 3.x. Specifically:

  1. some mbedtls APIs are removed or renamed in 3.x so that we need to do the migration
  2. fix some fmtlib compile issues, e.g. making enums formattable
  3. we changed to use MBEDTLS_CONFIG_FILE to specify the full configuration instead of leveraging MBEDTLS_USER_CONFIG_FILE on top of the default mbedtls configuration (this is for working around internal building issues)
codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 33.84615% with 43 lines in your changes are missing coverage. Please review.

Project coverage is 72.98%. Comparing base (f63ec73) to head (7fa9518).

:exclamation: Current head 7fa9518 differs from pull request most recent head ac19086. Consider uploading reports for the commit ac19086 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #249 +/- ## ========================================== - Coverage 73.33% 72.98% -0.35% ========================================== Files 71 71 Lines 7421 7477 +56 ========================================== + Hits 5442 5457 +15 - Misses 1979 2020 +41 ``` | [Files](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread) | Coverage Δ | | |---|---|---| | [include/commissioner/error.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=include%2Fcommissioner%2Ferror.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-aW5jbHVkZS9jb21taXNzaW9uZXIvZXJyb3IuaHBw) | `100.00% <100.00%> (ø)` | | | [src/library/coap.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=src%2Flibrary%2Fcoap.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2xpYnJhcnkvY29hcC5ocHA=) | `96.38% <ø> (ø)` | | | [src/library/dtls.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=src%2Flibrary%2Fdtls.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2xpYnJhcnkvZHRscy5jcHA=) | `82.35% <100.00%> (+0.28%)` | :arrow_up: | | [src/library/dtls.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=src%2Flibrary%2Fdtls.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2xpYnJhcnkvZHRscy5ocHA=) | `100.00% <100.00%> (ø)` | | | [src/library/openthread/sha256.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=src%2Flibrary%2Fopenthread%2Fsha256.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2xpYnJhcnkvb3BlbnRocmVhZC9zaGEyNTYuY3Bw) | `100.00% <ø> (ø)` | | | [src/library/coap.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/249?src=pr&el=tree&filepath=src%2Flibrary%2Fcoap.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2xpYnJhcnkvY29hcC5jcHA=) | `60.46% <25.86%> (-3.24%)` | :arrow_down: |