tls

package
v0.0.0-...-30fe120 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package tls implements the logic to generate and install TLS certificates.

Index

Constants

View Source
const (
	ServerKey  = "server.key"
	ClientKey  = "client.key"
	CAKey      = "ca.key"
	CACert     = "ca.crt"
	ServerCert = "server.crt"
	ClientCert = "client.crt"
)

Certs material filenames

View Source
const DefaultRSABits int = 4096

DefaultRSABits is the default bit size to generate an RSA keypair

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCTLS

type GRPCTLS struct {
	RSABits      int
	Country      string
	Organization string
	CommonName   string
	Expiration   time.Duration
	// contains filtered or unexported fields
}

A GRPCTLS represents a TLS Generator for Falco

func GRPCTLSGenerator

func GRPCTLSGenerator(country, organization, name string, days int) *GRPCTLS

GRPCTLSGenerator is used to init a new TLS Generator for Falco

func (*GRPCTLS) FlushToDisk

func (g *GRPCTLS) FlushToDisk(path string) error

FlushToDisk is used to persist the cert material from a GRPCTLS to disk given a path.

func (*GRPCTLS) Generate

func (g *GRPCTLS) Generate() error

Generate is used to first generate TLS material in memory.

type Options

type Options struct {
	Country string
	Org     string
	Name    string
	Path    string
	Days    int
}

Options represents the `install tls` command o.

func (*Options) Run

func (o *Options) Run() error

Run executes the business logic of the `install tls` command.

Jump to

Keyboard shortcuts

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