Repository navigation
Add small Mbed TLS accessors and x509_crt_parse_der_nocopy - #76
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Post-handshake TLS 1.2 and TLS 1.3 tests are missing for blocked and partially written encrypted alerts, leaving retry behavior and delivery of exactly one valid alert unverified.
1 open issue
What changed in this PR
Expands the Mbed TLS compatibility layer with version, TLS, cipher-suite, and OID accessors, plus certificate parsing without copying the DER buffer.
Changes:
- Implements the new APIs and tracks certificate-buffer ownership.
- Updates configuration, symbol exports, and compatibility documentation.
- Adds tests for the new accessors, alert handling, and no-copy parsing.
| File | Description |
|---|---|
wolfpsa/mbedtls_compat/mbedtls/x509_crt.h |
Adds buffer ownership and no-copy parsing declarations. |
wolfpsa/mbedtls_compat/mbedtls/version.h |
Declares version accessors. |
wolfpsa/mbedtls_compat/mbedtls/ssl.h |
Adds TLS accessors and alert constants. |
wolfpsa/mbedtls_compat/mbedtls/ssl_ciphersuites.h |
Defines cipher-suite metadata and accessors. |
wolfpsa/mbedtls_compat/mbedtls/oid.h |
Declares numeric OID formatting. |
wolfpsa.map |
Exports OID and version symbols. |
tools/psa_want_probe.c |
Enables version support in generated configuration. |
test/mbedtls_compat/x509_crt_test.c |
Tests no-copy ownership and OID formatting. |
test/mbedtls_compat/version_test.c |
Tests version macros and runtime accessors. |
test/mbedtls_compat/ssl_test.c |
Tests pending data, alerts, record expansion, and cipher-suite metadata. |
test/mbedtls_compat/Makefile |
Registers the version test. |
src/mbedtls/x509.c |
Implements no-copy parsing and numeric OID formatting. |
src/mbedtls/version.c |
Implements version accessors. |
src/mbedtls/ssl.c |
Implements TLS and cipher-suite APIs. |
docs/mbedtls-compatibility.md |
Documents added support and behavioral differences. |
Review effort: Balanced
Frauschi
reviewed
Nov 24, 2026
Frauschi
left a comment
Member
There was a problem hiding this comment.
6 comments inline, nothing blocking.
padelsbach
force-pushed
the
small-accessors
branch
from
November 24, 2026 19:13
65196b4 to
913e072
Compare
padelsbach
force-pushed
the
small-accessors
branch
from
November 24, 2026 19:41
913e072 to
4b3b08a
Compare
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.

Adds the following misc small routines:
mbedtls_version_get_number,_get_string,_get_string_full(
MBEDTLS_VERSION_Cis now set in the generated config)mbedtls_ssl_check_pending,mbedtls_ssl_get_record_expansion,mbedtls_ssl_send_alert_message, plus theMBEDTLS_SSL_ALERT_MSG_*valuesmbedtls_ssl_ciphersuite_from_id,_from_string,_get_name,_get_idmbedtls_oid_get_numeric_string, in a newmbedtls/oid.hmbedtls_x509_crt_parse_der_nocopy