mbedtls/ChangeLog.d/cert-write-issuer-not-ca.txt
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

7 lines
337 B
Plaintext

Bugfix
* Fix the `cert_write` sample program accepting an issuer certificate
that is not allowed to issue certificates. A certificate whose
basicConstraints extension has cA=FALSE, or whose keyUsage extension
does not include keyCertSign, is now rejected instead of being used to
sign a certificate. Fixes #10779.