Repository navigation
Add remaining Mbed TLS SSL error codes and content lengths - #78
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Mbed TLS compatibility expansion.
No open issues 🎉
What changed in this PR
Expands wolfPSA’s Mbed TLS compatibility layer with missing SSL constants and error handling, helping more Mbed TLS clients compile.
Changes:
- Adds 31 SSL error codes and input/output content-length macros.
- Maps peer fatal alerts and adds error descriptions with Mbed TLS-compatible formatting.
- Adds fatal-alert tests and documents compatibility limits.
| File | Description |
|---|---|
wolfpsa/mbedtls_compat/mbedtls/ssl.h |
Defines missing SSL error codes and content-length macros. |
test/mbedtls_compat/ssl_test.c |
Tests TLS fatal alerts and uses the content-length macro. |
test/mbedtls_compat/error_test.c |
Tests fatal-alert error-string formatting. |
src/mbedtls/ssl.c |
Maps fatal alerts and enforces record-size compatibility. |
src/mbedtls/error.c |
Adds error descriptions and suppresses low-level details for fatal alerts. |
docs/mbedtls-compatibility.md |
Documents added constants, fatal-alert behavior, and fixed record limits. |
Review effort: Balanced
padelsbach
force-pushed
the
constants
branch
from
November 24, 2026 02:34
09a8948 to
e39cd03
Compare
Frauschi
reviewed
Nov 24, 2026
Frauschi
left a comment
Member
There was a problem hiding this comment.
Codes and strings match Mbed TLS 4.x; two small nits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 31
MBEDTOLS_ERR_SSL_*codes that were missing. wolfPSA now has all 50 codes from MBedTLS 4.3 with the same values as 3.6. Also addMBEDTLS_SSL_IN_CONTENT_LENandMBEDTLS_SSL_OUT_CONTENT_LEN.This change allows many clients to compile.