certs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotPresent = errors.New("certificates are not present")

ErrNotPresent is returned when certificates are not found in the expected directory.

Functions

func TLSConfig

func TLSConfig() (tlsConfig *tls.Config, certDir string, err error)

TLSConfig loads TLS certificates from the directory specified by CERTDIR environment variable. If CERTDIR is not set, defaults to /var/run/secrets/spiffe.io (standard k8s SPIFFE path).

Expected files in the cert directory:

  • ca.crt: CA certificate for client verification
  • tls.crt: Server certificate
  • tls.key: Server private key

Returns ErrNotPresent if the CA cert file doesn't exist, allowing callers to fall back to plaintext. Returns a different error if certs exist but are invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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