ca

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificate

func CreateCertificate(csrPEM, caPEM, caKeyPEM []byte) ([]byte, error)

Types

type APIVersion

type APIVersion string
const (
	APIVersionV1 APIVersion = "v1"
)

type CA

type CA struct {
	Certificate []byte
	PrivateKey  []byte
}

func CreateCA

func CreateCA(cfg *CAConfig) (CA, error)

type CAConfig

type CAConfig struct {
	APIVersion   APIVersion `json:"apiVersion"`
	CommonName   string     `json:"commonName"`
	Organization string     `json:"organization"`
	Country      string     `json:"country"`
	Province     string     `json:"province"`
	Locality     string     `json:"locality"`
	NotBefore    time.Time  `json:"notBefore"`
	NotAfter     time.Time  `json:"notAfter"`
}

Jump to

Keyboard shortcuts

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