tls

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LetsEncryptError

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

type Module

type Module struct {
	Config *config.Module
	Router *router.Module
	Logger *logger.Module
	// contains filtered or unexported fields
}

func (*Module) CleanUp

func (m *Module) CleanUp(domain, token, keyAuth string) error

CleanUp implements the acme.ChallengeProvider.CleanUp

func (*Module) GetAllRegisteredDomains

func (m *Module) GetAllRegisteredDomains() ([]string, error)

func (*Module) GetRegistration

func (m *Module) GetRegistration(domain string, withPrivateKey bool) (*Registration, error)

GetRegistration from the tls dir.

func (*Module) Init

func (m *Module) Init(c *service.Config)

func (*Module) LoadCertResource

func (m *Module) LoadCertResource(domain string) (*acme.CertificateResource, error)

LoadCertResource will return the CertificateResource if it exists on the disk, else nil.

func (*Module) ObtainCert

func (m *Module) ObtainCert(email, domain string) error

func (*Module) Present

func (m *Module) Present(domain, token, keyAuth string) error

Present implements the acme.ChallengeProvider.Present

func (*Module) SaveRegistration

func (m *Module) SaveRegistration(r *Registration) error

func (*Module) ServeHTTP

func (m *Module) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*Module) StartTLSProxy

func (m *Module) StartTLSProxy() error

StartTLSProxy starts the tls proxy on port 443. SSL is terminated and the connection in passed to the Router.

type Registration

type Registration struct {
	Email        string                     `json:"email"`
	AgreedOn     string                     `json:"agreed_on"`
	Domain       string                     `json:"domain"`
	Registration *acme.RegistrationResource `json:"registration"`
	// contains filtered or unexported fields
}

func (*Registration) GetEmail

func (r *Registration) GetEmail() string

func (*Registration) GetPrivateKey

func (r *Registration) GetPrivateKey() crypto.PrivateKey

func (*Registration) GetRegistration

func (r *Registration) GetRegistration() *acme.RegistrationResource

func (*Registration) Init

func (r *Registration) Init(ks *keystore.KeyStore) (err error)

Jump to

Keyboard shortcuts

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