@@ -147,6 +147,20 @@ func parseTrustClass(s *bufio.Scanner) ([sha1.Size]byte, *trustObj, error) {
147147 return h , to , nil
148148}
149149
150+ // manualExclusions contains a map of SHA1 fingerprints of roots that we manually exclude
151+ // from the bundle for various reasons.
152+ var manualExclusions = map [string ]bool {
153+ // TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
154+ // We exclude this root because mozilla manually constrains this root to
155+ // issue names under .tr, but this information is only encoded in the CCADB
156+ // IncludedCACertificateReport, in a field the format of which is
157+ // undocumented, and is only used for this particular certificate. Rather
158+ // than adding special parsing for this, we skip it. When code constraint
159+ // support is available, we may also want to simply add a manual constraint,
160+ // rather than a manual exclusion.
161+ "3143649becce27eced3a3f0b8f0de4e891ddeeca" : true ,
162+ }
163+
150164// Parse parses a NSS certdata.txt formatted file, returning only
151165// trusted serverAuth roots, as well as any additional constraints. This parser
152166// is very opinionated, only returning roots that are currently trusted for
@@ -248,6 +262,9 @@ func Parse(r io.Reader) ([]*Certificate, error) {
248262 if ! e .trust .trusted {
249263 continue
250264 }
265+ if manualExclusions [fmt .Sprintf ("%x" , h )] {
266+ continue
267+ }
251268 nssCert := & Certificate {X509 : e .cert .c }
252269 if e .cert .DistrustAfter != nil {
253270 nssCert .Constraints = append (nssCert .Constraints , DistrustAfter (* e .cert .DistrustAfter ))
0 commit comments