conf

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TRC

type TRC struct {
	ISD               addr.ISD        `toml:"isd"`
	Description       string          `toml:"description"`
	SerialVersion     scrypto.Version `toml:"serial_version"`
	BaseVersion       scrypto.Version `toml:"base_version"`
	VotingQuorum      uint8           `toml:"voting_quorum"`
	GracePeriod       util.DurWrap    `toml:"grace_period"`
	NoTrustReset      bool            `toml:"no_trust_reset"`
	Validity          Validity        `toml:"validity"`
	CoreASes          []addr.AS       `toml:"core_ases"`
	AuthoritativeASes []addr.AS       `toml:"authoritative_ases"`
	CertificateFiles  []string        `toml:"cert_files"`
	Votes             []int           `toml:"votes"`
	// contains filtered or unexported fields
}

TRC holds the TRC configuration.

func LoadTRC

func LoadTRC(file string) (TRC, error)

LoadTRC loads the TRC configuration from the provided file. The contents are already validated.

func (*TRC) Certificates

func (cfg *TRC) Certificates() ([]*x509.Certificate, error)

Certificates returns the specified certificates.

type Validity

type Validity struct {
	NotBefore uint32       `toml:"not_before"`
	Validity  util.DurWrap `toml:"validity"`
}

Validity defines a validity period.

func (Validity) Eval

func (v Validity) Eval(notBefore time.Time) cppki.Validity

Eval returns the validity period. The not before parameter is only used if the struct's not before field value is zero.

func (Validity) Validate

func (v Validity) Validate() error

Validate checks that the validity is set.

Jump to

Keyboard shortcuts

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