adscertcrypto

package
v0.0.0-...-8eb2530 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFakeAdsCertRecordForTesting

func GenerateFakeAdsCertRecordForTesting(adscertCallsign string) string

func GenerateFakeKeyPairFromDomainNameForTesting

func GenerateFakeKeyPairFromDomainNameForTesting(adscertCallsign string) ([32]byte, [32]byte)

func GenerateFakePrivateKeysForTesting

func GenerateFakePrivateKeysForTesting(adscertCallsign string) []string

func NewFakeKeyGeneratingDnsResolver

func NewFakeKeyGeneratingDnsResolver() adscertcounterparty.DNSResolver

Types

type AuthenticatedConnectionSignatureResponse

type AuthenticatedConnectionSignatureResponse struct {
	SignatureMessages []string
}

type AuthenticatedConnectionSigningPackage

type AuthenticatedConnectionSigningPackage struct {
	Timestamp string
	Nonce     string

	RequestInfo RequestInfo
}

type AuthenticatedConnectionVerificationPackage

type AuthenticatedConnectionVerificationPackage struct {
	RequestInfo      RequestInfo
	SignatureMessage string
}

type AuthenticatedConnectionVerificationResponse

type AuthenticatedConnectionVerificationResponse struct {
	// TODO: provide more details on verification
	BodyValid bool
	URLValid  bool
}

type AuthenticatedConnectionsSignatory

type AuthenticatedConnectionsSignatory interface {
	EmbossSigningPackage(request *AuthenticatedConnectionSigningPackage) (*AuthenticatedConnectionSignatureResponse, error)
	VerifySigningPackage(request *AuthenticatedConnectionVerificationPackage) (*AuthenticatedConnectionVerificationResponse, error)

	// TODO: Design a better way to do this testing hook.
	SynchronizeForTesting(invocationTLDPlusOne string)
}

func NewLocalAuthenticatedConnectionsSignatory

func NewLocalAuthenticatedConnectionsSignatory(originCallsign string, privateKeyBase64Strings []string, useFakeKeyGeneratingDNS bool) AuthenticatedConnectionsSignatory

type RequestInfo

type RequestInfo struct {
	InvocationHostname string
	URLHash            [32]byte
	BodyHash           [32]byte
}

Jump to

Keyboard shortcuts

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