Skip to content

Commit 5a5ae22

Browse files
authored
Ceremony: allow shortening of Subject Organization Name (#8310)
In general, the ceremony tool requires that any Unrestricted Cross Sign (see Baseline Requirements, Section 7.1.2.2.3) must have a Subject Organization Name which is identical to the issuer's Organization Name. Allow a special case whereby a cert (such as ISRG Root X1) which has Subject Organization Name "Internet Security Research Group" can cross-certify a cert (such as the upcoming Root YR) which has the shorter string "ISRG" for that same field. --- > [!WARNING] > ~~Do not merge before #8309
1 parent d5bb88b commit 5a5ae22

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

cmd/ceremony/main.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,12 +767,24 @@ func crossCertCeremony(configBytes []byte) error {
767767
return fmt.Errorf("cross-signed subordinate CA's NotBefore predates the existing CA's NotBefore")
768768
}
769769
// BR 7.1.2.2.3 Cross-Certified Subordinate CA Extensions
770+
// We want the Extended Key Usages of our cross-signs to be identical to those
771+
// in the cert being cross-signed, for the sake of consistency. However, our
772+
// Root CA Certificates do not contain any EKUs, as required by BR 7.1.2.1.2.
773+
// Therefore, cross-signs of our roots count as "unrestricted" cross-signs per
774+
// the definition in BR 7.1.2.2.3, and are subject to the requirement that
775+
// the cross-sign's Issuer and Subject fields must either:
776+
// - have identical organizationNames; or
777+
// - have orgnaizationNames which are affiliates of each other.
778+
// Therefore, we enforce that cross-signs with empty EKUs have identical
779+
// Subject Organization Name fields... or allow one special case where the
780+
// issuer is "Internet Security Research Group" and the subject is "ISRG" to
781+
// allow us to migrate from the longer string to the shorter one.
770782
if !slices.Equal(lintCert.ExtKeyUsage, toBeCrossSigned.ExtKeyUsage) {
771783
return fmt.Errorf("lint cert and toBeCrossSigned cert EKUs differ")
772784
}
773785
if len(lintCert.ExtKeyUsage) == 0 {
774-
// "Unrestricted" case, the issuer and subject need to be the same or at least affiliates.
775-
if !slices.Equal(lintCert.Subject.Organization, issuer.Subject.Organization) {
786+
if !slices.Equal(lintCert.Subject.Organization, issuer.Subject.Organization) &&
787+
!(slices.Equal(issuer.Subject.Organization, []string{"Internet Security Research Group"}) && slices.Equal(lintCert.Subject.Organization, []string{"ISRG"})) {
776788
return fmt.Errorf("attempted unrestricted cross-sign of certificate operated by a different organization")
777789
}
778790
}

0 commit comments

Comments
 (0)