Documentation ¶
Overview ¶
package token validates a sigsum submit-token.
Index ¶
- Constants
- func LookupDomain(ctx context.Context, lookupTXT func(context.Context, string) ([]string, error), ...) ([]string, error)
- func MakeToken(signer crypto.Signer, logKey *crypto.PublicKey) (crypto.Signature, error)
- func NormalizeDomainName(domain string) (string, error)
- func VerifyToken(key *crypto.PublicKey, logKey *crypto.PublicKey, token *crypto.Signature) error
- type DnsVerifier
- type SubmitHeader
Constants ¶
View Source
const ( Label = "_sigsum_v1" HeaderName = "Sigsum-Token" )
Variables ¶
This section is empty.
Functions ¶
func LookupDomain ¶ added in v0.4.1
func LookupDomain(ctx context.Context, lookupTXT func(context.Context, string) ([]string, error), domain string) ([]string, error)
Looks up the appropriate TXT records for a domain.
func MakeToken ¶ added in v0.1.7
func NormalizeDomainName ¶ added in v0.1.18
Normalizes a utf8 domain name.
Types ¶
type DnsVerifier ¶
type DnsVerifier struct {
// contains filtered or unexported fields
}
DnsResolver implements the Verifier interface by querying DNS.
func NewDnsVerifier ¶
func NewDnsVerifier(logKey *crypto.PublicKey) *DnsVerifier
func (*DnsVerifier) Verify ¶
func (dv *DnsVerifier) Verify(ctx context.Context, header *SubmitHeader) error
type SubmitHeader ¶ added in v0.3.3
Represents the contents of the HTTP Sigsum-Submit: header-
func (*SubmitHeader) FromHeader ¶ added in v0.3.3
func (s *SubmitHeader) FromHeader(header string) error
func (*SubmitHeader) ToHeader ¶ added in v0.3.3
func (s *SubmitHeader) ToHeader() string
Click to show internal directories.
Click to hide internal directories.