security

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type X509Certification

type X509Certification struct {
	IpAddresses []net.IP  //allowed ip addresses
	DNSNames    []string  //allowed dns names
	NotAfter    time.Time //expire
}

X509Certification @Description:

func NewX509Certification

func NewX509Certification(addrs []string, names []string, before time.Time) *X509Certification

NewX509Certification @Description: @param addrs @param names @param before @return *X509Certification

func (*X509Certification) Create

func (c *X509Certification) Create() (cert []byte, privateKey []byte, err error)

Create @Description: @receiver c @return cert @return privateKey @return err

func (*X509Certification) CreateAndWriteWithRandomName

func (c *X509Certification) CreateAndWriteWithRandomName(path string) (string, error)

CreateAndWriteWithRandomName @Description: @receiver c @param path

Jump to

Keyboard shortcuts

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