caddytlsfilemanager

package module
v0.0.0-...-91a501c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 12 Imported by: 0

README

File based Certificate Manager for Caddy

The same module as the original get_certificate http <url> but works with a file.

requires global ask configuration

Usage

Caddyfile:

{
	on_demand_tls {
		ask http://localhost:3333
	}
}

:443 {
	tls {
		get_certificate file /path/to/file.list
	}
}

file.list:

domain.com /etc/certificates/domain.com.bundle
domain.name.com /etc/certificates/domain.name.com.bundle

the second column is the path to the file that must contain a PEM chain including the full certificate (with intermediates) as well as the private key.

License

This module is open-sourced software licensed under the MIT license.

Vano Devium


Made with ❤️ in Ukraine

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCertGetter

type FileCertGetter struct {
	// The path to file with domain-certificate dictionary. Required.
	Path string `json:"path,omitempty"`
	// contains filtered or unexported fields
}

FileCertGetter can get a certificate via file.

func (FileCertGetter) CaddyModule

func (fcg FileCertGetter) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (FileCertGetter) GetCertificate

func (fcg FileCertGetter) GetCertificate(ctx context.Context, hello *tls.ClientHelloInfo) (*tls.Certificate, error)

func (*FileCertGetter) Provision

func (fcg *FileCertGetter) Provision(ctx caddy.Context) error

func (*FileCertGetter) UnmarshalCaddyfile

func (fcg *FileCertGetter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile deserializes Caddyfile tokens into ts.

... file <path>

Jump to

Keyboard shortcuts

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