tls

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package tls is GTB's thin adapter over the standalone hardened-TLS module gitlab.com/phpboyscout/go/tls. It holds the GTB-specific config-key adapter Resolve (plus SharedPrefix) that materialises a Pair from GTB configuration, the piece that cannot live in the framework-free module. Everything else (the hardened default config, the client config and cert pool builders) is used straight from the module.

Index

Constants

View Source
const SharedPrefix = "server.tls"

SharedPrefix is the config prefix for TLS settings shared across every transport. A transport-specific prefix (e.g. "server.grpc.tls") overrides individual fields, so one certificate can serve all transports with per-transport overrides where needed. It is a GTB config-key convention, so it lives here with the Resolve adapter rather than in the config-agnostic module.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair = gtls.Pair

Pair is the typed enabled/cert/key triple used to configure TLS for any transport. Aliased from gitlab.com/phpboyscout/go/tls so Resolve can return it without callers importing both packages.

func Resolve

func Resolve(cfg config.Reader, transportPrefix string) Pair

Resolve resolves the TLS settings for a transport from GTB config. It starts from the shared SharedPrefix ("server.tls") and overrides each field individually from the transport-specific prefix (e.g. "server.grpc.tls", "server.http.tls", "server.gateway.tls") whenever that key is set.

Jump to

Keyboard shortcuts

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