cert

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MarshalPublicKey = x509.MarshalPKIXPublicKey
	ParsePublicKey   = x509.ParsePKIXPublicKey
)

Functions

func NewCA

func NewCA() (*x509.Certificate, crypto.PrivateKey, error)

NewCA generates a new Certification Authority certificate and it's private key.

func NewCert

func NewCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, req *x509.CertificateRequest) ([]byte, error)

NewCert generates a new certificate for the given IP address signed by the given CA.

func NewIPCert

func NewIPCert(ca *x509.Certificate, caPrivateKey crypto.PrivateKey, pubKey crypto.PublicKey, ips ...net.IP) ([]byte, error)

NewIPCert generates a new certificate for the given IP address signed by the given CA.

func NewPrivateKey

func NewPrivateKey() (*ecdsa.PrivateKey, error)

NewPrivateKey generates a new private key.

func NewTLSConf

func NewTLSConf(caCertDER []byte, certDER []byte, privKey *ecdsa.PrivateKey) (*tls.Config, error)

NewTLSConf creates a new TLS config with the given CA certificate, certificate and private key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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