Documentation
¶
Overview ¶
Package refdata holds the dated reference lists the TLS evaluation judges against: the Mozilla and Chrome root stores (with their distrust constraints), the published Diffie-Hellman groups, the CT log list and the certificate-lifetime limits.
Every list except the lifetime table is generated by ./gen from a downloaded source and carries that source's URL, retrieval date and SHA-256. Nothing is fetched at run time. The lifetime table is a short schedule transcribed from a ballot; it is written by hand in lifetime.go and pinned by a test.
Regenerate (the sources are not committed; licences and attribution are in docs/reference-data.md):
curl -o mozilla.csv 'https://ccadb.my.salesforce-sites.com/ccadb/Report?Name=MozillaTLSServerAuthenticationCSV'
curl -o chrome.csv 'https://ccadb.my.salesforce-sites.com/ccadb/Report?Name=ChromeTLSServerAuthenticationCSV'
curl -o ct.json https://www.gstatic.com/ct/log_list/v3/log_list.json
for n in 2409 3526 5114 7919; do curl -o rfc$n.txt https://www.rfc-editor.org/rfc/rfc$n.txt; done
go run ./internal/refdata/gen -mozilla mozilla.csv -chrome chrome.csv -ctlogs ct.json \
-rfcs . -retrieved YYYY-MM-DD -out internal/refdata
Index ¶
- Constants
- func Distrust() *pki.Distrust
- func MaxLifetime(notBefore time.Time) (int, bool)
- func RootCertificates() []*x509.Certificate
- func RootName(sha string) (owner, name string, ok bool)
- func Stores() []*pki.Store
- type CTLog
- type DHPrime
- type DistrustEntry
- type DistrustFile
- type DistrustIncident
- type LifetimeLimit
- type Source
Constants ¶
const LifetimeSourceLabel = "CA/B Forum BR §6.3.2 (Ballot SC-081v3)"
LifetimeSourceLabel names the rule a limit comes from.
const StaleAfterDays = 180
StaleAfterDays is the age at which a list is flagged as old (REQ-TDAT-3).
Variables ¶
This section is empty.
Functions ¶
func Distrust ¶ added in v0.4.1
Distrust returns the bundled distrust list. The value is shared and read-only.
func MaxLifetime ¶
MaxLifetime returns the limit for a certificate issued at notBefore, and false when it was issued before the first entry (no limit is applied).
func RootCertificates ¶ added in v0.4.1
func RootCertificates() []*x509.Certificate
RootCertificates returns every root of the bundled stores once, for checking the signature of a CRL issued by a root.
Types ¶
type CTLog ¶
type CTLog struct {
ID string // base64 log ID (SHA-256 of the log key)
Name string
Operator string
State string
URL string
}
CTLog is one log from the CT log list.
func LookupCTLog ¶
LookupCTLog finds a log by its 32-byte ID.
type DHPrime ¶
type DHPrime struct {
SHA256 string // of the prime's big-endian bytes, leading zeros trimmed
Name string
Bits int
Source string // "RFC 7919 §A.1"
Negotiated bool // an RFC 7919 named group (the recommended kind)
}
DHPrime is one published Diffie-Hellman group.
func LookupDHPrime ¶
LookupDHPrime finds a published group by the hex SHA-256 the prober records.
type DistrustEntry ¶ added in v0.4.1
type DistrustEntry struct {
Name string `json:"name"`
SPKISHA256 string `json:"spkiSha256,omitempty"`
CertSHA256 []string `json:"certSha256,omitempty"`
}
DistrustEntry is one key, with the certificates known to carry it.
type DistrustFile ¶ added in v0.4.1
type DistrustFile struct {
Version string `json:"version"` // YYYY-MM-DD of the last edit
About string `json:"about"`
Incidents []DistrustIncident `json:"incidents"`
}
DistrustFile is the schema of distrust.json.
func DistrustData ¶ added in v0.4.1
func DistrustData() DistrustFile
DistrustData returns the parsed list, for the reference-data page and tests.
type DistrustIncident ¶ added in v0.4.1
type DistrustIncident struct {
ID string `json:"id"`
Title string `json:"title"`
Kind string `json:"kind"` // pki.KindKeyCompromise | pki.KindCADistrust
Since string `json:"since"`
Summary string `json:"summary"`
Sources []string `json:"sources"`
Entries []DistrustEntry `json:"entries"`
}
DistrustIncident is one event that put keys on the list.
type LifetimeLimit ¶
LifetimeLimit is the maximum validity for certificates issued on or after From.
func LifetimeTable ¶
func LifetimeTable() []LifetimeLimit
LifetimeTable returns a copy of the schedule.
type Source ¶
type Source struct {
Name string `json:"name"`
URL string `json:"source"`
Retrieved string `json:"retrieved"` // YYYY-MM-DD
SHA256 string `json:"sha256"` // of the downloaded source file(s)
Licence string `json:"licence"`
Count int `json:"count"`
}
Source describes where a bundled list came from.