acme

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package acme provides automatic access to certificates from Let's Encrypt and any other ACME-based CA The code here is largely coiped from https://github.com/go-acme/lego/tree/master/cmd This package is intended to provide basic functionality for obtaining and renewing certificates and implements the "HTTP-01" and "TLSALPN-01" challenge types. For more advanced features use external tools such as "lego"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertificates

func GetCertificates() error

GetCertificates tries to obtain the certificates for the configured domains

Types

type Configuration

type Configuration struct {
	Email      string `json:"email" mapstructure:"email"`
	KeyType    string `json:"key_type" mapstructure:"key_type"`
	CertsPath  string `json:"certs_path" mapstructure:"certs_path"`
	CAEndpoint string `json:"ca_endpoint" mapstructure:"ca_endpoint"`
	// if a certificate is to be valid for multiple domains specify the names separated by commas,
	// for example: example.com,www.example.com
	Domains            []string           `json:"domains" mapstructure:"domains"`
	RenewDays          int                `json:"renew_days" mapstructure:"renew_days"`
	HTTP01Challenge    HTTP01Challenge    `json:"http01_challenge" mapstructure:"http01_challenge"`
	TLSALPN01Challenge TLSALPN01Challenge `json:"tls_alpn01_challenge" mapstructure:"tls_alpn01_challenge"`
	// contains filtered or unexported fields
}

Configuration holds the ACME configuration

func (*Configuration) Initialize

func (c *Configuration) Initialize(configDir string, checkRenew bool) error

Initialize validates and set the configuration

type HTTP01Challenge

type HTTP01Challenge struct {
	Port        int    `json:"port" mapstructure:"port"`
	WebRoot     string `json:"webroot" mapstructure:"webroot"`
	ProxyHeader string `json:"proxy_header" mapstructure:"proxy_header"`
}

HTTP01Challenge defines the configuration for HTTP-01 challenge type

type TLSALPN01Challenge

type TLSALPN01Challenge struct {
	Port int `json:"port" mapstructure:"port"`
}

TLSALPN01Challenge defines the configuration for TLSALPN-01 challenge type

Jump to

Keyboard shortcuts

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