Skip to content

build: support modern CMake and Mbed TLS 4 - #289

Open
chemag wants to merge 2 commits into
sepfy:mainfrom
chemag:build-modern-dependencies
Open

chemag wants to merge 2 commits into
sepfy:mainfrom
chemag:build-modern-dependencies

Conversation

@chemag

@chemag chemag commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Support current CMake and Mbed TLS releases without changing older build paths.
Pass the legacy policy floor to vendored cJSON and usrsctp only when building with CMake 4 or newer.
Disable usrsctp warnings-as-errors for newer compilers.
Search both dist/lib and dist/lib64.
Skip unused entropy and CTR-DRBG initialization and teardown under Mbed TLS 4, while preserving those calls for earlier releases.

Testing

Before: CMake 4.3 failed to configure vendored cJSON and usrsctp because compatibility below CMake 3.5 was removed.
CMake 4.3 with bundled Mbed TLS 4.1: Full build and all five tests passed.
CMake 3.31 with bundled Mbed TLS 4.1: Full build and all five tests passed.
Mbed TLS 3.6.7 DTLS-SRTP compile check passed.

chemag and others added 2 commits October 30, 2026 14:57
Support CMake 4 when configuring vendored cJSON and usrsctp.

Includes:
* disable usrsctp warnings-as-errors for newer compilers
* search lib64 for dependencies installed (Fedora)

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
Mbed TLS 4 handles random generation through PSA. The DTLS-SRTP path
already avoids the legacy CTR-DRBG callbacks for cookies and SSL, but
still initialized and freed unused entropy and CTR-DRBG contexts. Some
Mbed TLS 4 integrations omit those legacy symbols.

Guard the unused setup and teardown on pre-4 releases while preserving
the existing path for older Mbed TLS versions.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Codex <codex@openai.com>
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.

1 participant