Informational means that the new log list can contain Usable, Qualified, and Pending logs, which will all accept submissions but not necessarily be trusted by Chrome clients.
const Informational purpose = "info"
Issuance means that the new log list should only contain Usable logs, which can issue SCTs that will be trusted by all Chrome clients.
const Issuance purpose = "scts"
Validation means that the new log list should only contain Usable and Readonly logs, whose SCTs will be trusted by all Chrome clients but aren't necessarily still issuing SCTs today.
const Validation purpose = "lint"
func InitLintList(path string) error
InitLintList creates and stores a loglist intended for linting (i.e. with purpose Validation). We have to store this in a global because the zlint framework doesn't (yet) support configuration, so the e_scts_from_same_operator lint cannot load a log list on its own. Instead, we have the CA call this initialization function at startup, and have the lint call the getter below to get access to the cached list.
List represents a list of logs, grouped by their operator, arranged by the "v3" schema as published by Chrome: https://www.gstatic.com/ct/log_list/v3/log_list_schema.json It exports no fields so that consumers don't have to deal with the terrible autogenerated names of the structs it wraps.
type List map[string]OperatorGroup
func GetLintList() List
GetLintList returns the log list initialized by InitLintList. This must only be called after InitLintList has been called on the same (or parent) goroutine.
func New(path string) (List, error)
New returns a LogList of all operators and all logs parsed from the file at the given path. The file must conform to the JSON Schema published by Google: https://www.gstatic.com/ct/log_list/v3/log_list_schema.json
func (ll List) OperatorForLogID(logID string) (string, error)
OperatorForLogID returns the Name of the Group containing the Log with the given ID, or an error if no such log/group can be found.
func (ll List) Permute() []string
Permute returns the list of operator group names in a randomized order.
func (ll List) PickOne(operator string, expiry time.Time) (string, string, error)
PickOne returns the URI and Public Key of a single randomly-selected log which is run by the given operator and whose temporal interval includes the given expiry time. It returns an error if no such log can be found.
func (ll List) SubsetForPurpose(names []string, p purpose) (List, error)
SubsetForPurpose returns a new log list containing only those logs whose names match those in the given list, and whose state is acceptable for the given purpose. It returns an error if any of the given names are not found in the starting list, or if the resulting list is too small to satisfy the Chrome "two operators" policy.
Log represents a single log run by an operator. It contains just the info necessary to contact a log, and to determine whether that log will accept the submission of a certificate with a given expiration.
type Log struct { Name string Url string Key string StartInclusive time.Time EndExclusive time.Time State state }
OperatorGroup represents a group of logs which are all run by the same operator organization. It provides constant-time lookup of logs within the group by their unique ID.
type OperatorGroup map[string]Log