basstls

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Common name for the certificate authority.
	CAName = "bass"

	// Arbitrary values for the CA cert.
	CACountry  = "CA" // Canada (coincidence)
	CAProvince = "Ontario"
	CALocality = "Toronto"
)

Variables

View Source
var CAFiles = []string{CAName + ".crt", CAName + ".key"}
View Source
var (
	// DefaultDir is the canonical location to store certs on the user's
	// local machine.
	DefaultDir = filepath.Join(xdg.ConfigHome, "bass", "tls")
)

Functions

func CACert

func CACert(dir string) string

CACert returns the path to the CA certificate in the given dir.

func Generate

func Generate(dir, host string) (*pkix.Certificate, *pkix.Key, error)

func Init

func Init(dir string) error

Init initializes dir with a CA.

Types

This section is empty.

Jump to

Keyboard shortcuts

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