cert

package
v0.0.0-...-acd7349 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2013 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyBits = 1024

Functions

func NewCA

func NewCA(envName string, expiry time.Time) (certPEM, keyPEM []byte, err error)

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

func NewServer

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

NewServer generates a certificate/key pair suitable for use by a server for an environment with the given name.

func ParseCert

func ParseCert(certPEM []byte) (*x509.Certificate, error)

ParseCert parses the given PEM-formatted X509 certificate.

func ParseCertAndKey

func ParseCertAndKey(certPEM, keyPEM []byte) (*x509.Certificate, *rsa.PrivateKey, error)

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

func Verify

func Verify(srvCertPEM, caCertPEM []byte, 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