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

Set Cert: should not check BasicConstraint CA: True with hardcoded value #2831

Open
rw8896 opened this issue Sep 10, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@rw8896
Copy link
Contributor

rw8896 commented Sep 10, 2024

/*alias cert model*/
if (status && (len == sizeof(basic_constraints_true_case)) &&
(libspdm_consttime_is_mem_equal(cert_basic_constraints,
basic_constraints_true_case,
sizeof(basic_constraints_true_case)))) {
return true;
}

Device Cert could specify pathLenConstraint in BasicConstraints and hence the hardcoded BASIC_CONSTRAINTS_STRING_TRUE_CASE can't cover all the true cases.

#define BASIC_CONSTRAINTS_STRING_TRUE_CASE {0x30, 0x03, 0x01, 0x01, 0xFF}

@steven-bellock steven-bellock added the bug Something isn't working label Sep 10, 2024
@steven-bellock
Copy link
Contributor

Presumably the call to libspdm_x509_get_extended_basic_constraints would fail as cert_basic_constraints is not large enough to hold the whole field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants