generator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCACert

func GenCACert(option CertOption) (*x509.Certificate, *rsa.PrivateKey, error)

func GenClientCert

func GenClientCert(option CertOption) (*x509.Certificate, *rsa.PrivateKey, error)

func GenServerCert

func GenServerCert(option CertOption) (*x509.Certificate, *rsa.PrivateKey, error)

Types

type CertOption

type CertOption struct {
	CommonName    string
	Organizations []string
	Hosts         []string
	NotBefore     time.Time
	NotAfter      time.Time

	RSAKeySize int
	PrivateKey *rsa.PrivateKey

	ParentCert *x509.Certificate
	ParentKey  *rsa.PrivateKey

	ExtraSubject    pkix.Name
	ExtraExtensions []pkix.Extension
}

Jump to

Keyboard shortcuts

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