adscertcounterparty

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair() (string, string, error)

Types

type CounterpartyAPI

type CounterpartyAPI interface {
	LookUpInvocationCounterpartyByHostname(invocationHostname string) (InvocationCounterparty, error)

	LookUpSignatureCounterpartyByCallsign(adsCertCallsign string) (SignatureCounterparty, error)

	SynchronizeForTesting()
}

func NewCounterpartyManager

func NewCounterpartyManager(dnsResolver DNSResolver, base64PrivateKeys []string) CounterpartyAPI

type CounterpartyStatus

type CounterpartyStatus int
const (
	StatusUnspecified CounterpartyStatus = iota
	StatusOK
	StatusNotYetChecked
	StatusErrorOnDNS
	StatusErrorOnDNSSEC
	StatusErrorOnAdsCertConfigParse
	StatusErrorOnAdsCertConfigEval
	StatusErrorOnKeyValidation
	StatusErrorOnSharedSecretCalculation
)

func (CounterpartyStatus) String

func (cs CounterpartyStatus) String() string

type DNSResolver

type DNSResolver interface {
	LookupTXT(ctx context.Context, name string) ([]string, error)
}

func NewFakeDnsResolver

func NewFakeDnsResolver() DNSResolver

func NewRealDnsResolver

func NewRealDnsResolver() DNSResolver

type InvocationCounterparty

type InvocationCounterparty interface {
	GetStatus() CounterpartyStatus

	GetSignatureCounterparties() []SignatureCounterparty
}

type SharedSecret

type SharedSecret interface {
	LocalKeyID() string
	RemoteKeyID() string
	Secret() *[32]byte
}

type SignatureCounterparty

type SignatureCounterparty interface {
	GetAdsCertIdentityDomain() string

	HasSharedSecret() bool

	SharedSecret() SharedSecret

	GetStatus() CounterpartyStatus
}

Jump to

Keyboard shortcuts

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