tlsalpn01

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ACMETLS1Protocol is the ALPN Protocol ID for the ACME-TLS/1 Protocol.
	ACMETLS1Protocol = "acme-tls/1"
)

Variables

This section is empty.

Functions

func ChallengeBlocks

func ChallengeBlocks(domain, keyAuth string) ([]byte, []byte, error)

ChallengeBlocks returns PEM blocks (certPEMBlock, keyPEMBlock) with the acmeValidation-v1 extension and domain name for the `tls-alpn-01` challenge.

func ChallengeCert

func ChallengeCert(domain, keyAuth string) (*tls.Certificate, error)

ChallengeCert returns a certificate with the acmeValidation-v1 extension and domain name for the `tls-alpn-01` challenge.

Types

type Challenge

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

func NewChallenge

func NewChallenge(core *api.Core, validate ValidateFunc, provider challenge.Provider) *Challenge

func (*Challenge) SetProvider

func (c *Challenge) SetProvider(provider challenge.Provider)

func (*Challenge) Solve

func (c *Challenge) Solve(authz acme.Authorization) error

Solve manages the provider to validate and solve the challenge.

type ProviderServer

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

ProviderServer implements ChallengeProvider for `TLS-ALPN-01` challenge. It may be instantiated without using the NewProviderServer if you want only to use the default values.

func NewProviderServer

func NewProviderServer(iface, port string) *ProviderServer

NewProviderServer creates a new ProviderServer on the selected interface and port. Setting iface and / or port to an empty string will make the server fall back to the "any" interface and port 443 respectively.

func (*ProviderServer) CleanUp

func (s *ProviderServer) CleanUp(domain, token, keyAuth string) error

CleanUp closes the HTTPS server.

func (*ProviderServer) GetAddress

func (s *ProviderServer) GetAddress() string

func (*ProviderServer) Present

func (s *ProviderServer) Present(domain, token, keyAuth string) error

Present generates a certificate with a SHA-256 digest of the keyAuth provided as the acmeValidation-v1 extension value to conform to the ACME-TLS-ALPN spec.

type ValidateFunc

type ValidateFunc func(core *api.Core, domain string, chlng acme.Challenge) error

Jump to

Keyboard shortcuts

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