cert

package
v0.0.0-...-3043ea8 Latest Latest
Warning

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

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

Documentation

Overview

Cert automates the generation of certificate and certificate authorities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCA

func NewCA(cn string, expiry time.Time) ([]byte, []byte, error)

NewCA generates a CA certificate/key pair.

func NewCSR

func NewCSR(user string, role string) ([]byte, []byte, error)

NewCSR generates a CSR for CN=user,O=role It returns the CSR and private key in PEM format.

func NewCert

func NewCert(caCertPEM, caKeyPEM []byte, expiry time.Time, cn string, extKeyUsage []x509.ExtKeyUsage) ([]byte, []byte, error)

NewCert generates a certificate/key pair.

func SignCSR

func SignCSR(csr *x509.CertificateRequest, parent *x509.Certificate, privKey *rsa.PrivateKey) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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