reiss

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrKeyChanged   common.ErrMsg = "Verifying key has changed in the meantime"
	ErrNotACustomer common.ErrMsg = "ISD-AS not in customer mapping"
)

Errors

View Source
const (
	HandlerTimeout = 5 * time.Second
)

Variables

View Source
var (
	// SleepAfterFailure is the base time to sleep after a failed attempt to push the chain.
	// The actual sleep time is: attempts * SleepAfterFailure.
	SleepAfterFailure = time.Second
	// DefaultTryTimeout is the default timeout for one sync try if the context
	// has no deadline set.
	DefaultTryTimeout = 20 * time.Second
)

Functions

This section is empty.

Types

type CorePusher

type CorePusher struct {
	LocalIA addr.IA
	TrustDB trustdb.TrustDB
	Msger   infra.Messenger
}

CorePusher is a periodic.Task that pushes the local chain to all core CSes in the ISD. The interval this task is run in is expected to be rather large (e.g. 1h).

func (*CorePusher) Name

func (p *CorePusher) Name() string

Name returns the tasks name.

func (*CorePusher) Run

func (p *CorePusher) Run(ctx context.Context)

Run makes sure all core CS have the chain of the local AS.

type Handler

type Handler struct {
	State *config.State
	IA    addr.IA
}

Handler handles certificate chain reissue requests.

Reissue requests are sent by non-issuer ASes to issuer ASes. The request needs to be signed with the private key associated with the newest verifying key in the customer mapping. Certificate chains are issued automatically by the issuer ASes.

func (*Handler) Handle

func (h *Handler) Handle(r *infra.Request) *infra.HandlerResult

type Requester

type Requester struct {
	Msgr       infra.Messenger
	State      *config.State
	IA         addr.IA
	LeafTime   time.Duration
	CorePusher *periodic.Runner
	Caller     string
}

Requester requests reissued certificate chains before expiration of the currently active certificate chain.

func (*Requester) Name

func (r *Requester) Name() string

Name returns the tasks name.

func (*Requester) Run

func (r *Requester) Run(ctx context.Context)

Run requests reissued certificate chains from the issuer AS.

type Self

type Self struct {
	// Msgr is used to propagate key updates to the messenger, and not for network traffic
	Msgr       infra.Messenger
	State      *config.State
	IA         addr.IA
	IssTime    time.Duration
	LeafTime   time.Duration
	CorePusher *periodic.Runner
	Caller     string
}

Self periodically issues self-signed certificate chains on an issuer AS before the old one expires.

func (*Self) Name

func (s *Self) Name() string

Name returns the tasks name.

func (*Self) Run

func (s *Self) Run(ctx context.Context)

Run issues certificate chains for the local AS.

Jump to

Keyboard shortcuts

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