Skip to content

ISSUE-4281: Add ECDH source to static library build#4351

Open
herbenderbler wants to merge 1 commit into
flipperdevices:devfrom
herbenderbler:ISSUE-4281/add-ecdh
Open

ISSUE-4281: Add ECDH source to static library build#4351
herbenderbler wants to merge 1 commit into
flipperdevices:devfrom
herbenderbler:ISSUE-4281/add-ecdh

Conversation

@herbenderbler

@herbenderbler herbenderbler commented Mar 12, 2026

Copy link
Copy Markdown

Summary:

This PR enables mbedTLS ECDH at link time by compiling the ECDH implementation into the static library.
MBEDTLS_ECDH_C and the SDK header are already present, but ecdh.c was not included in the build sources. This resolves ISSUE #4281.

What Changed?:

  • Added mbedtls/library/ecdh.c to the mbedTLS source list in mbedtls.scons.

Validation:

  • Ran ./fbt firmware_all successfully.
  • Build log includes CC lib/mbedtls/library/ecdh.c.
  • Firmware link and package steps complete successfully.

MBEDTLS_ECDH_C and mbedtls/ecdh.h are already enabled/exposed, but the ECDH implementation (mbedtls/library/ecdh.c) was not compiled into libmbedtls.a.

Add ecdh.c to lib/mbedtls.scons source list so ECDH symbols are available at link/runtime for firmware and apps.

Validated with:
- ./fbt firmware_all (success)
- build log includes CC lib/mbedtls/library/ecdh.c
@herbenderbler
herbenderbler marked this pull request as ready for review March 12, 2026 04:05
@turbospok turbospok added AI-generated To mark changes made via AI tools App Loader / API FAP loader + API-related labels Jun 26, 2026
@chrisdebian

Copy link
Copy Markdown

Checked this against the actual pinned mbedtls submodule commit rather than just reading the diff: MBEDTLS_ECDH_C is indeed already enabled in lib/mbedtls_cfg.h:70, and library/ecdh.c exists at the pinned commit but wasn't in the build-sources list — confirmed as a genuine missing-file gap, not hypothetical. Straightforward fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-generated To mark changes made via AI tools App Loader / API FAP loader + API-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants