setupserver

package
v0.0.0-...-63c3a42 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

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

func SetupTlsWithParams(params Params) error

Types

type Params

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
}

Jump to

Keyboard shortcuts

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