Documentation
¶
Overview ¶
Package engine provides a simplified interface to certificate generation provided by the standard package crypto/*
Currently this package supports generation of certificates suitable for use in securing a web application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateResponse ¶
type CertificateResponse struct {
CertificatePem string `json:"crt_file" xml:",cdata"`
CertificateKey string `json:"key_file" xml:",cdata"`
CertificateAuthorityPem string `json:"registry_ca" xml:",cdata"`
}
CertificateResponse is the result of a certificate generation request.
func (*CertificateResponse) WritePlain ¶
func (c *CertificateResponse) WritePlain(w io.Writer) (err error)
WritePlain exports the cert, key, and CA as text to the writer.
type Context ¶
type Context struct {
CertificateAuthority *x509.Certificate
CertificateAuthorityPrivateKey *rsa.PrivateKey
PrivateKeyBitLength int
Development bool
ListenAddress string
DebugListenAddress string
KeyServer *kserver.GoKeyServer
}
Context contains the attributes that are used to generate certificates.
func (*Context) GenerateCertificate ¶
func (t *Context) GenerateCertificate(domain string, client bool) (response *CertificateResponse, err error)
GenerateCertificate uses the certificate authority and private key to generate a certificate for the provided domain. The wildcard and short domain name are also added as subject alternative names.
Click to show internal directories.
Click to hide internal directories.