cert

package
v0.0.0-...-3c94193 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 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 Certificate

type Certificate struct {
	Cert []byte
	Key  []byte
}

func GenerateCert

func GenerateCert(c *Config) (*Certificate, error)

GenerateCert generates cert, and private key and returns (cert, private key, error)

func GenerateCerts

func GenerateCerts(c *Config, numberCerts int) ([]*Certificate, error)

GenerateCerts use all CPUs in the host to generate numberCerts concurrently

type Config

type Config struct {
	Host string
	Org  string

	// Date time in RFC3339 format (a.k.a "2006-01-02T15:04:05Z07:00")
	ValidFrom string

	ValidFor   time.Duration
	IsCA       bool
	RsaBits    int
	EcdsaCurve string
}

Jump to

Keyboard shortcuts

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