loglist

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package loglist allows parsing and searching of the master CT Log list.

Index

Constants

View Source
const (
	// LogListURL has the master URL for Google Chrome's log list.
	LogListURL = "https://www.gstatic.com/ct/log_list/log_list.json"
	// LogListSignatureURL has the URL for the signature over Google Chrome's log list.
	LogListSignatureURL = "https://www.gstatic.com/ct/log_list/log_list.sig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	Description       string `json:"description"`
	Key               []byte `json:"key"`
	MaximumMergeDelay int    `json:"maximum_merge_delay"` // seconds
	OperatedBy        []int  `json:"operated_by"`         // List of log operators
	URL               string `json:"url"`
	FinalSTH          *STH   `json:"final_sth,omitempty"`
	DisqualifiedAt    int    `json:"disqualified_at,omitempty"`
	DNSAPIEndpoint    string `json:"dns_api_endpoint,omitempty"` // DNS API endpoint for the log
}

Log describes a log.

type LogList

type LogList struct {
	Logs      []Log      `json:"logs"`
	Operators []Operator `json:"operators"`
}

LogList holds a collection of logs and their operators

func NewFromJSON added in v1.0.13

func NewFromJSON(llData []byte) (*LogList, error)

NewFromJSON creates a LogList from JSON encoded data.

func NewFromSignedJSON added in v1.0.13

func NewFromSignedJSON(llData, rawSig []byte, pubKey crypto.PublicKey) (*LogList, error)

NewFromSignedJSON creates a LogList from JSON encoded data, checking a signature along the way. The signature data should be provided as the raw signature data.

func (*LogList) FindLogByKey

func (ll *LogList) FindLogByKey(key []byte) *Log

FindLogByKey finds the log with the given DER-encoded key.

func (*LogList) FindLogByKeyHash

func (ll *LogList) FindLogByKeyHash(keyhash [sha256.Size]byte) *Log

FindLogByKeyHash finds the log with the given key hash.

func (*LogList) FindLogByKeyHashPrefix added in v1.0.20

func (ll *LogList) FindLogByKeyHashPrefix(prefix string) []*Log

FindLogByKeyHashPrefix finds all logs whose key hash starts with the prefix.

func (*LogList) FindLogByName

func (ll *LogList) FindLogByName(name string) []*Log

FindLogByName returns all logs whose names contain the given string.

func (*LogList) FindLogByURL

func (ll *LogList) FindLogByURL(url string) *Log

FindLogByURL finds the log with the given URL.

func (*LogList) FuzzyFindLog

func (ll *LogList) FuzzyFindLog(input string) []*Log

FuzzyFindLog tries to find logs that match the given unspecified input, whose format is unspecified. This generally returns a single log, but if text input that matches multiple log descriptions is provided, then multiple logs may be returned.

type Operator

type Operator struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Operator describes a log operator

type STH

type STH struct {
	TreeSize          int    `json:"tree_size"`
	Timestamp         int    `json:"timestamp"`
	SHA256RootHash    []byte `json:"sha256_root_hash"`
	TreeHeadSignature []byte `json:"tree_head_signature"`
}

STH describes a signed tree head from a log.

Directories

Path Synopsis
The findlog binary attempts to provide information about a log based on ID or name.
The findlog binary attempts to provide information about a log based on ID or name.

Jump to

Keyboard shortcuts

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