cert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Certificate   = "CERTIFICATE"
	RSAPrivateKey = "RSA PRIVATE KEY"
)

Variables

This section is empty.

Functions

func CreatePrivateKey

func CreatePrivateKey(bits int) (*rsa.PrivateKey, error)

func CreateSelfSignedCA

func CreateSelfSignedCA(privateKeyBits int, serialNumber *big.Int, subject pkix.Name, notBefore, notAfter time.Time) (*x509.Certificate, []byte, *bytes.Buffer, *rsa.PrivateKey, *bytes.Buffer, error)

func CreateSelfSignedCertificate

func CreateSelfSignedCertificate(caCert *x509.Certificate, caPrivKey *rsa.PrivateKey, privateKeyBits int, serialNumber *big.Int, subject pkix.Name, notBefore, notAfter time.Time) (*x509.Certificate, []byte, *bytes.Buffer, *rsa.PrivateKey, *bytes.Buffer, error)

func CreateSerialNumber

func CreateSerialNumber(nbr int) *big.Int

func CreateSubject

func CreateSubject(organization, country, province, locality, streetAddress, postalCode []string) (pkix.Name, error)

func PEMEncodeBlock

func PEMEncodeBlock(blockType string, byArray []byte) (*bytes.Buffer, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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