cert

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host       string
	ValidFrom  string
	ValidFor   time.Duration
	IsCA       bool
	RsaBits    int
	EcdsaCurve string
	Subject    pkix.Name
}

func New

func New() *Config

func (*Config) Generate

func (c *Config) Generate(cert io.Writer, key io.Writer) (err error)

Generate generates certificate and key with specified config

func (*Config) GenerateFiles

func (c *Config) GenerateFiles(dir string) (err error)

GenerateFiles generate certificate and key and writes it to specified dir in files cert.pem and key.pem

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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