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 ¶
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 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).
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 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.