Documentation ¶
Index ¶
- Variables
- func NewCA(envName string, expiry time.Time) (certPEM, keyPEM string, err error)
- func NewClient(caCertPEM, caKeyPEM string, expiry time.Time) (certPEM, keyPEM string, err error)
- func NewServer(caCertPEM, caKeyPEM string, expiry time.Time, hostnames []string) (certPEM, keyPEM string, err error)
- func ParseCert(certPEM string) (*x509.Certificate, error)
- func ParseCertAndKey(certPEM, keyPEM string) (*x509.Certificate, *rsa.PrivateKey, error)
- func Verify(srvCertPEM, caCertPEM string, when time.Time) error
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyBits = 1024
Functions ¶
func NewCA ¶
NewCA generates a CA certificate/key pair suitable for signing server keys for an environment with the given name.
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.