cert

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyBits = 2048

Functions

func NewCA

func NewCA(envName, UUID string, expiry time.Time) (certPEM, keyPEM string, err error)

NewCA generates a CA certificate/key pair suitable for signing server keys for an environment with the given name.

func NewDefaultServer

func NewDefaultServer(caCertPEM, caKeyPEM string, hostnames []string) (certPEM, keyPEM string, err error)

NewDefaultServer generates a certificate/key pair suitable for use by a server, with an expiry time of 10 years.

func NewServer

func NewServer(caCertPEM, caKeyPEM string, expiry time.Time, hostnames []string) (certPEM, keyPEM string, err error)

NewServer generates a certificate/key pair suitable for use by a server.

func ParseCert

func ParseCert(certPEM string) (*x509.Certificate, error)

ParseCert parses the given PEM-formatted X509 certificate.

func ParseCertAndKey

func ParseCertAndKey(certPEM, keyPEM string) (*x509.Certificate, *rsa.PrivateKey, error)

ParseCertAndKey parses the given PEM-formatted X509 certificate and RSA private key.

func Verify

func Verify(srvCertPEM, caCertPEM string, when time.Time) error

Verify verifies that the given server certificate is valid with respect to the given CA certificate at the given time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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