Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No handling of X509 Name Constraints #8759

Open
BrianSipos opened this issue Jan 29, 2024 · 1 comment
Open

No handling of X509 Name Constraints #8759

BrianSipos opened this issue Jan 29, 2024 · 1 comment
Labels
bug component-x509 help-wanted This issue is not being actively worked on, but PRs welcome.

Comments

@BrianSipos
Copy link

Summary

The current X509 decoder and data model does not attempt to handle the Name Constraints extension value. This means that any certificate which contains the extension marked as critical will not be decodable by mbedtls, and the CA/Browser Baseline Requirements permit this behavior handling of name constraints so it is something that will appear in the wild.

System information

Mbed TLS version (number or commit id):
Operating system and version: Ubuntu 22.04
Configuration (if not default, please attach mbedtls_config.h): default
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): gcc
Additional environment information:

Expected behavior

The Name Constraints extension should at least be decoded and have permitted and excluded GeneralName values kept with the certificate data.

Actual behavior

The certificate fails to load properly at all, making CAs that use Name Constraints fail to operate with mbedtls.

Steps to reproduce

Attempt to load a CA certificate with a Name Constraints extension value. For example the attached
cert-with-name-constraints.txt

Additional information

Based on the restrictions in RFC 5280 and in the CA Browser Baseline Requirements, it is possible to reduce the permitted and excluded lists to have the same internal form as the Subject Alternative Name extension. I am doing some prototyping on this now and it appears to be handled properly.

@paul-elliott-arm paul-elliott-arm added bug help-wanted This issue is not being actively worked on, but PRs welcome. labels Jan 29, 2024
@paul-elliott-arm
Copy link
Member

Hi Brian,

We would welcome a patch to add this parsing if you would want to contribute this, otherwise I am not sure yet what the priority of this will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-x509 help-wanted This issue is not being actively worked on, but PRs welcome.
Projects
None yet
Development

No branches or pull requests

2 participants