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 ¶
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.
Click to show internal directories.
Click to hide internal directories.