tls

package
v0.9.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LetsEncryptURLStaging    = "https://acme-staging-v02.api.letsencrypt.org/directory"
	LetsEncryptURLProduction = "https://acme-v02.api.letsencrypt.org/directory"
)
View Source
const (
	AuthorizationHeader = "Authorization"
	ContentTypeHeader   = "Content-Type"
	ContentTypeJSON     = "application/json"
)

Variables

View Source
var (
	CertificatesRequestLock         = &sync.Mutex{}
	CertificateRequests             = map[string]any{}
	ErrCertificateRequestInProgress = errors.New("certificate request in progress")
)

Functions

func ProvisionWildcardCert

func ProvisionWildcardCert(req router.Request, resp router.Response, domain, token string) error

ProvisionWildcardCert provisions a Let's Encrypt wildcard certificate for *.<domain>.oss-acorn.io

func RenewCert

func RenewCert(req router.Request, resp router.Response) error

RenewCert handles the renewal of existing TLS certificates

func RequireSecretTypeTLS

func RequireSecretTypeTLS(h router.Handler) router.Handler

RequireSecretTypeTLS is a middleware that ensures that we only act on TLS-Type secrets

Types

type ACMEDNS01ChallengeProvider

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

func NewACMEDNS01ChallengeProvider

func NewACMEDNS01ChallengeProvider(endpoint, domain, token string) *ACMEDNS01ChallengeProvider

func (*ACMEDNS01ChallengeProvider) CleanUp

func (d *ACMEDNS01ChallengeProvider) CleanUp(domain, token, keyAuth string) error

func (*ACMEDNS01ChallengeProvider) Present

func (d *ACMEDNS01ChallengeProvider) Present(domain, token, keyAuth string) error

func (*ACMEDNS01ChallengeProvider) Timeout

func (d *ACMEDNS01ChallengeProvider) Timeout() (timeout, interval time.Duration)

type DNSClient

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

func NewDNSClient

func NewDNSClient(endpoint, domain, token string) DNSClient

func (*DNSClient) DeleteDNSRecord

func (d *DNSClient) DeleteDNSRecord(domain string) error

func (*DNSClient) SetTXTRecord

func (d *DNSClient) SetTXTRecord(domain, text string) error

type LEUser

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

func (*LEUser) GetEmail

func (u *LEUser) GetEmail() string

func (*LEUser) GetPrivateKey

func (u *LEUser) GetPrivateKey() crypto.PrivateKey

func (*LEUser) GetRegistration

func (u *LEUser) GetRegistration() *registration.Resource

Jump to

Keyboard shortcuts

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