Documentation ¶
Index ¶
Constants ¶
const Informational purpose = "info"
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 Issuance purpose = "scts"
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 Validation purpose = "lint"
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.
Variables ¶
This section is empty.
Functions ¶
func InitLintList ¶
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.
Types ¶
type List ¶
type List map[string]OperatorGroup
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.
func GetLintList ¶
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 ¶
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 (List) OperatorForLogID ¶
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 (List) PickOne ¶
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 (List) SubsetForPurpose ¶
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.
type Log ¶
type Log struct { Name string Url string Key string StartInclusive time.Time EndExclusive time.Time State state }
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 OperatorGroup ¶
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.