rootca

package
v0.0.0-...-f34593e Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRootCA

func GenerateRootCA() (*rsa.PrivateKey, *x509.Certificate, error)

root.keyとroot.crtを生成する

func LoadCert

func LoadCert(path string) (*x509.Certificate, error)

func LoadKey

func LoadKey(path string) (*rsa.PrivateKey, error)

func LoadRootCA

func LoadRootCA(keyPath, certPath string) (*rsa.PrivateKey, *x509.Certificate, error)

func SaveCert

func SaveCert(cert *x509.Certificate, path string) error

func SaveKey

func SaveKey(key *rsa.PrivateKey, path string) error

Types

type RootCA

type RootCA struct {
	Key  *rsa.PrivateKey
	Cert *x509.Certificate
}

func New

func New() *RootCA

func (*RootCA) Generate

func (r *RootCA) Generate(keyPath, certPath string) error

func (*RootCA) IssueServerCert

func (r *RootCA) IssueServerCert(cert *x509.Certificate, pubKey *rsa.PublicKey) (*x509.Certificate, error)

func (*RootCA) Load

func (r *RootCA) Load(keyPath, certPath string) error

func (*RootCA) Save

func (r *RootCA) Save(keyPath, certPath string) error

Jump to

Keyboard shortcuts

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