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
RFC 5280 §4.1.2.6 when specifying Subject says:
This is tested by
x509-limbo's rfc5280::ca-empty-subject testcase.Separately it may be worth considering if
x509.CreateCertificateshould also error if asked to create a CA certificate without a subject.Relates to #65085 & https://go-review.googlesource.com/c/go/+/783980