You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create scaffolding for configuring lints with issuers (#8923)
Create the ability for lints to be configured with either an issuer
certificate (useful for everything but self-signed roots), or an
pre-existing certificate (useful for cross-signs), or both. Because
zlint expects configs to be TOML strings, build some infrastructure that
is capable of serializing and deserializing these configs, and
augmenting them at runtime. This lets us combine the actual zlint config
(which includes things like ignored lints and how to connect to
PKIMetal) with the dynamic issuer or existing cert config.
Have the CA and Ceremony tool correctly configure zlint with the
relevant additional certs. No lints use this yet, but our CP/CPS lints
will soon.
returnfmt.Errorf("mismatch between lintCert and finalCert RawTBSCertificate DER bytes: \"%x\" != \"%x\"", lintCert.RawTBSCertificate, finalCert.RawTBSCertificate)
returnfmt.Errorf("mismatch between lintCert and finalCert RawTBSCertificate DER bytes: \"%x\" != \"%x\"", lintCert.RawTBSCertificate, finalCert.RawTBSCertificate)
returnConfig{}, fmt.Errorf("zlint config file %q must not set %s.%s: it is derived from the issuer certificate", path, cpcps.GlobalConfigNamespace, key)
42
+
}
43
+
}
44
+
returnConfig{toml: string(contents)}, nil
45
+
}
46
+
47
+
// WithIssuer returns a copy of the Config with a stanza holding the PEM of the
48
+
// issuer's certificate. This is necessary for the CP/CPS profile lints, which
49
+
// check that certain fields of the certificate being linted match the issuer. A
50
+
// nil issuer, or one with no raw DER bytes (i.e. a to-be-signed template rather
51
+
// than a real certificate, as in a self-signed root ceremony), returns the
0 commit comments