Repository navigation
Add Mbed TLS X.509 certificate fields - #58
Open
padelsbach wants to merge 1 commit into
Open
padelsbach wants to merge 1 commit into
padelsbach wants to merge 1 commit into
Conversation
padelsbach
force-pushed
the
x509-fields
branch
from
November 17, 2026 03:14
0919125 to
4eabfd6
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues include a test data race, missing authority-key raw data, unterminated empty-DN output, and clock-failure handling that can fail to flag expired certificates.
4 open issues
What changed in this PR
This PR expands wolfPSA’s Mbed TLS compatibility layer with parsed X.509 certificate fields and related helper APIs.
Changes:
- Adds certificate metadata, extension fields, and helpers for names, serial numbers, validity, and key usage.
- Updates compatibility settings for zero serial numbers and thread-safe time conversion.
- Extends regression tests and documents supported APIs and remaining differences.
| File | Description |
|---|---|
wolfpsa/mbedtls_compat/mbedtls/x509.h |
Adds X.509 types, constants, and helper declarations. |
wolfpsa/mbedtls_compat/mbedtls/x509_crt.h |
Exposes parsed certificate fields and extension helpers. |
wolfpsa/mbedtls_compat/mbedtls/asn1.h |
Adds ASN.1 constants and linked data types. |
user_settings.h |
Enables zero serial numbers and reentrant time conversion. |
test/mbedtls_compat/x509_crt_test.c |
Tests fields, extensions, formatting, time, and allocation failures. |
src/mbedtls/x509.c |
Implements field parsing, cleanup, and X.509 helpers. |
README.md |
Documents expanded compatibility and configuration requirements. |
Review effort: Balanced
padelsbach
force-pushed
the
x509-fields
branch
from
November 17, 2026 03:35
4eabfd6 to
3806f39
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.

mbedtls_x509_crt now has the parsed certificate fields: version, serial, signature OID, issuer, subject, validity, key identifiers, subject alt names, policies, basic constraints, key usage, extended key usage, NS cert type and ext_types. The field buffers point into raw der bytes.