Skip to content

Add Mbed TLS X.509 certificate fields - #58

Open
padelsbach wants to merge 1 commit into
wolfSSL:masterfrom
padelsbach:x509-fields
Open

padelsbach wants to merge 1 commit into
wolfSSL:masterfrom
padelsbach:x509-fields

Conversation

@padelsbach

@padelsbach padelsbach commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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.

Copilot AI balanced review requested due to automatic review settings November 17, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread src/mbedtls/x509.c Resolved
Comment thread src/mbedtls/x509.c Resolved
Comment thread src/mbedtls/x509.c Resolved
Comment thread test/mbedtls_compat/x509_crt_test.c Resolved
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.

2 participants