trust

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("trust:")

Error is the default error class

Functions

This section is empty.

Types

type CertDB

type CertDB interface {
	Include(ctx context.Context, pi *identity.PeerIdentity) (certid int64, err error)
	LookupByCertID(ctx context.Context, id int64) (*identity.PeerIdentity, error)
}

CertDB is a database of peer identities.

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool implements different peer verifications.

func NewPool

func NewPool(kademlia *kademlia.Kademlia, trustAll bool, trustedSatelliteIDs string) (*Pool, error)

NewPool creates a new trust pool using kademlia to find certificates and with the specified list of trusted satellites.

func (*Pool) GetSignee

func (pool *Pool) GetSignee(ctx context.Context, id storj.NodeID) (_ signing.Signee, err error)

GetSignee gets the corresponding signee for verifying signatures. It ignores passed in ctx cancellation to avoid miscaching between concurrent requests.

func (*Pool) VerifySatelliteID

func (pool *Pool) VerifySatelliteID(ctx context.Context, id storj.NodeID) (err error)

VerifySatelliteID checks whether id corresponds to a trusted satellite.

func (*Pool) VerifyUplinkID

func (pool *Pool) VerifyUplinkID(ctx context.Context, id storj.NodeID) (err error)

VerifyUplinkID verifides whether id corresponds to a trusted uplink.

Jump to

Keyboard shortcuts

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