certutils

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCertPEM added in v0.11.0

func EncodeCertPEM(cert *x509.Certificate) []byte

EncodeCertPEM returns PEM-endcoded certificate data

func NewPrivateKey added in v0.11.0

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

NewPrivateKey creates an RSA private key

func NewSignedCert added in v0.11.0

func NewSignedCert(cfg *cert.Config, key crypto.Signer, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, error)

NewSignedCert creates a signed certificate using the given CA certificate and key

Types

type Certificates

type Certificates struct {
	// PEM-encoded CA certificate that has been used to sign the server certificate
	CaCertificate []byte
	// PEM-encoded server certificate
	ServerCertificate []byte
	// PEM-encoded private key that has been used to sign the server certificate
	ServerCertKey []byte
}

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(config cert.Config) (*Certificates, error)

This function generates a self-signed TLS certificate

Jump to

Keyboard shortcuts

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