adscertcrypto

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 10 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 {
	SignatureInfo []SignatureInfo
}

AuthenticatedConnectionSignatureResponse contains the results of a signing request, including any signature and relevant metadata. Multiple signatures can technically be present according to the specification.

type AuthenticatedConnectionSigningPackage

type AuthenticatedConnectionSigningPackage struct {
	Timestamp string
	Nonce     string

	RequestInfo RequestInfo
}

AuthenticatedConnectionSigningPackage contains the parameters for a signing request.

type AuthenticatedConnectionVerificationPackage

type AuthenticatedConnectionVerificationPackage struct {
	RequestInfo      RequestInfo
	SignatureMessage string
}

AuthenticatedConnectionVerificationPackage contains a request for verifying a signature generated by another party.

type AuthenticatedConnectionVerificationResponse

type AuthenticatedConnectionVerificationResponse struct {
	BodyValid bool
	URLValid  bool
}

AuthenticatedConnectionVerificationResponse contains the results of verifying a signature.

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
}

RequestInfo conveys the basic parameters required for an authenticated connections signing or verify operation.

type SignatureInfo

type SignatureInfo struct {
	SignatureMessage string

	// Status as reported by the signing system.
	SigningStatus string

	FromDomain     string
	FromKey        string
	InvokingDomain string
	ToDomain       string
	ToKey          string
}

SignatureInfo captures the signature generated for the signing request. It also provides structured metadata about the signature operation, useful in the integrating application for diagnostics.

func (SignatureInfo) String

func (si SignatureInfo) String() string

String provides a summary of the generated signature, including the originating and destination parties. It also includes the keys used.

Jump to

Keyboard shortcuts

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