akasakariko 458fab9987
Reject a non-CA issuer in the cert_write program
cert_write signs a certificate with the issuer key without checking that
the issuer certificate may issue certificates. A certificate whose
basicConstraints extension has cA=FALSE, or whose keyUsage extension does
not include keyCertSign, was therefore accepted as a CA.

Check the issuer certificate after loading it and reject it when it is
explicitly not a CA. Certificates without a basicConstraints extension
are still accepted, for compatibility with v1 and v2 certificates, which
cannot carry extensions.

Fixes #10779.

Signed-off-by: akasakariko <148060537+akasakariko@users.noreply.github.com>
2026-10-22 21:07:17 +09:00
..
cert_app.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
cert_req.c fix guards and keep SHA 2026-08-13 09:35:50 +01:00
cert_write.c Reject a non-CA issuer in the cert_write program 2026-10-22 21:07:17 +09:00
CMakeLists.txt Revert "Remove mbedtls_test" 2024-12-10 16:56:49 +01:00
crl_app.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
load_roots.c Don't use printf("%llu") 2026-02-19 16:53:52 +01:00
req_app.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00