setup

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSubjectEmpty = errors.New("CA Subject must not be empty.")
)
View Source
var ErrValidityPeriodExpired = errors.New("Declining to setup CA which expires within 30 seconds.")

Functions

func Run

func Run(env *action.Environment, cfg *Config) error

Types

type Config

type Config struct {
	Subject  *dname.Config         `yaml:"subject" flags:""`
	Validity period.ValidityPeriod `yaml:"validity" flags:"validity,time duration/timestamp where the cert is valid to (examples: 30d, 1y, 20220530)"`
	KeyType  wcrypto.KeyType       `yaml:"keyType" flags:"key-type,private key type (rsa, ecdsa),t"`
}

func ConfigFromCert

func ConfigFromCert(cert *x509.Certificate) (*Config, error)

func DefaultConfig

func DefaultConfig(baseSubject *dname.Config) *Config

func EmptyConfig

func EmptyConfig() *Config

func (*Config) CompatibleWith

func (a *Config) CompatibleWith(b *Config) error

func (*Config) Verify

func (cfg *Config) Verify(now time.Time) error

Jump to

Keyboard shortcuts

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