Skip to content

crypto/x509: reject CA w/ empty subject #79744

Description

@cpu

RFC 5280 §4.1.2.6 when specifying Subject says:

If the subject is a CA (e.g., the basic constraints extension, as
discussed in Section 4.2.1.9, is present and the value of cA is
TRUE), then the subject field MUST be populated with a non-empty
distinguished name matching the contents of the issuer field (Section
4.1.2.4) in all certificates issued by the subject CA.

This is tested by x509-limbo's rfc5280::ca-empty-subject testcase.

Separately it may be worth considering if x509.CreateCertificate should also error if asked to create a CA certificate without a subject.

Relates to #65085 & https://go-review.googlesource.com/c/go/+/783980

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions