tlsutil

package
v0.70.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureServerTLS added in v0.70.0

func ConfigureServerTLS(
	server *http.Server,
	certFilePath, keyFilePath string,
) error

ConfigureServerTLS loads the certificate/key pair at certFilePath/ keyFilePath and installs it on server's TLSConfig (creating one via ServerConfig if server.TLSConfig is nil), applying the shared minimum TLS version floor. It is the single keypair-loading implementation shared by every built-in API provider (Blockfrost, Mesh, UTxORPC), replacing what was previously duplicated tls.LoadX509KeyPair-plus-floor logic per provider. Callers must still call server.ServeTLS (not Serve) after this returns successfully -- this only prepares the config, it does not decide whether the caller wants a TLS listener at all (see EffectiveTLS.Enabled in package apiconfig).

func LoadClientCAPool added in v0.69.0

func LoadClientCAPool(path string) (*x509.CertPool, error)

LoadClientCAPool reads a PEM-encoded CA bundle from path and returns an x509.CertPool built from it, for use as a tls.Config's ClientCAs — the trust anchor against which a server verifies client (mTLS) certificates. Returns an error if the file can't be read or contains no valid PEM certificates, rather than silently returning an empty (trust-nobody) pool.

func ServerConfig

func ServerConfig(config *tls.Config) *tls.Config

ServerConfig applies the minimum TLS version policy for server connections.

Types

This section is empty.

Jump to

Keyboard shortcuts

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