+18
−11
+4
−2
Loading
cert_verify: don't validate the trust-anchor root as a certificate; fail closed on unreadable keyUsage
Independent review:
- (Befund 5/LOW) A trust-anchor root matched from the configured store no
longer needs basicConstraints CA:TRUE/keyUsage keyCertSign -- RFC 5280
S6.1 treats it as configured, out-of-band trust (the same way a pinned
fingerprint is trusted), not a certificate to validate. Requiring that
would reject old v1 root CAs that predate basicConstraints entirely,
for no real security gain: the attacker-controlled material is the
peer-sent intermediates/leaf, not an administrator-configured root.
The check (renamed checkIntermediateConstraints) now only runs for
intermediates.
- (Befund 7/LOW) x509cert::keyUsageAllowsCertSign() returned true (no
restriction) when the keyUsage extension was present but malformed --
fails closed (false) now; "true" is reserved for the extension being
genuinely absent.
Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com>