setupserver

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 33

Documentation

Overview

Package setupserver assists in setting up TLS credentials for a server.

Package setupserver provides convenience functions for setting up a server with TLS credentials.

The package loads client and server certificates from files and registers them with the lib/srpc package. The following command-line flags are registered with the standard flag package:

-caFile:   Name of file containing the root of trust
-certFile: Name of file containing the SSL certificate
-keyFile:  Name of file containing the SSL key

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupTls

func SetupTls() error

func SetupTlsClientOnly

func SetupTlsClientOnly() error

func SetupTlsWithParams added in v0.3.2

func SetupTlsWithParams(params Params) error

Types

type Params added in v0.3.2

type Params struct {
	ClientOnly     bool // If true, only register client certificate and key.
	FailIfExpired  bool // If true, fail if certificate not yet valid or expired
	Logger         log.DebugLogger
	PermitInsecure bool // If true, ignore missing CA.
}

Jump to

Keyboard shortcuts

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