tlsconfig

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package tlsconfig loads configured transport trust and certificate material, preserving renewal callbacks and explicit TLS validation failures. It does not choose endpoints, credentials, HTTP budgets or retry policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientTLSFromEnv

func ClientTLSFromEnv(prefix string) (*tls.Config, error)

ClientTLSFromEnv configures an authenticated encrypted transport. Supplying any TLS file enables TLS; an explicit false flag cannot silently ignore it. Paths are administrator configuration, never caller-controlled request data.

func HTTPServerTLSFromEnv

func HTTPServerTLSFromEnv() (*tls.Config, error)

HTTPServerTLSFromEnv validates the complete serving configuration before a listener opens. A nil result is the explicit development/plain-HTTP mode.

func ListenAndServeHTTP

func ListenAndServeHTTP(server *http.Server) error

ListenAndServeHTTP honors the service's explicit HTTPS configuration and never falls back to cleartext when configured TLS material is missing or invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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