loglist

package
v0.20250825.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
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.

View Source
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

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.

Types

type List

type List []Log

List represents a list of logs arranged by the "v3" schema as published by Chrome: https://www.gstatic.com/ct/log_list/v3/log_list_schema.json

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

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 (List) ForTime

func (ll List) ForTime(expiry time.Time) List

ForTime returns a new log list containing only those logs whose temporal intervals include the given certificate expiration timestamp.

func (List) GetByID

func (ll List) GetByID(logID string) (Log, error)

GetByID returns the Log matching the given ID, or an error if no such log can be found.

func (List) Permute

func (ll List) Permute() List

Permute returns a new log list containing the exact same logs, but in a randomly-shuffled order.

func (List) SubsetForPurpose

func (ll List) SubsetForPurpose(names []string, p purpose, submitToTestLogs bool) (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.

type Log

type Log struct {
	Operator       string
	Name           string
	Id             string
	Key            []byte
	Url            string
	StartInclusive time.Time
	EndExclusive   time.Time
	State          loglist3.LogStatus
	Tiled          bool
	Type           string
}

Log represents a single log run by an operator. It contains just the info necessary to determine whether we want to submit to that log, and how to do so.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL