autotls

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCertDir

func DefaultCertDir() string

DefaultCertDir returns the default directory for auto-generated TLS certs.

func EnsureCert

func EnsureCert(certPath, keyPath string) (tls.Certificate, error)

EnsureCert generates a self-signed TLS certificate pair if they don't already exist at certPath/keyPath. If both files exist, it loads and returns them. If neither exists, it creates a new RSA 2048-bit key and self-signed cert valid for 365 days, then writes them to disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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