transport

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package transport provides transport related functions to other kwil-db packages to help configure and use TLS clients and services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClientTLSConfig

func DefaultClientTLSConfig() *tls.Config

DefaultClientTLSConfig returns a client tls config using just the system's CA pool, if present, otherwise an empty certificate pool.

func GenTLSKeyPair

func GenTLSKeyPair(certFile, keyFile string, org string, altDNSNames []string) error

GenTLSKeyPair generates a key/cert pair to the paths provided.

func NewClientTLSConfig

func NewClientTLSConfig(pemCerts []byte) (*tls.Config, error)

NewClientTLSConfig creates a new basic tls.Config for a TLS client. This is not appropriate for a server's config. Provide the server's certificate or it's root certificate authority.

func NewClientTLSConfigFromFile

func NewClientTLSConfigFromFile(certFile string) (*tls.Config, error)

NewClientTLSConfigFromFile creates a new basic tls.Config for a TLS client given the path to a PEM encoded certificate file to include in the root CAs. Provide the server's certificate or it's root certificate authority. Use DefaultClientTLSConfig to use just the system's CA pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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