Documentation ¶
Index ¶
- Variables
- func Certificate(certString, keyString string, certPath, keyPath string) ([]tls.Certificate, error)
- func CertificateHelpMessage(prefix string) string
- func CreateSelfSignedCertificate(key interface{}) (cert *x509.Certificate, err error)
- func CreateSelfSignedTLSCertificate(key interface{}) (*tls.Certificate, error)
- func HTTPSCertificate() ([]tls.Certificate, error)
- func HTTPSCertificateHelpMessage() string
- func PEMBlockForKey(key interface{}) (*pem.Block, error)
- func PublicKey(key interface{}) interface{}
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidCertificateConfiguration = errors.New("tls configuration is invalid")
ErrInvalidCertificateConfiguration is returned when an invaloid TLS configuration was found.
var ErrNoCertificatesConfigured = errors.New("no tls configuration was found")
ErrNoCertificatesConfigured is returned when no TLS configuration was found.
Functions ¶
func Certificate ¶
func Certificate( certString, keyString string, certPath, keyPath string, ) ([]tls.Certificate, error)
Certificate returns loads a TLS Certificate by looking at environment variables.
func CertificateHelpMessage ¶
CertificateHelpMessage returns a help message for configuring TLS Certificates.
func CreateSelfSignedCertificate ¶ added in v0.0.12
func CreateSelfSignedCertificate(key interface{}) (cert *x509.Certificate, err error)
CreateSelfSignedCertificate creates a self-signed x509 certificate.
func CreateSelfSignedTLSCertificate ¶ added in v0.0.28
func CreateSelfSignedTLSCertificate(key interface{}) (*tls.Certificate, error)
CreateSelfSignedTLSCertificate creates a self-signed TLS certificate.
func HTTPSCertificate ¶
func HTTPSCertificate() ([]tls.Certificate, error)
HTTPSCertificate returns loads a HTTP over TLS Certificate by looking at environment variables.
func HTTPSCertificateHelpMessage ¶
func HTTPSCertificateHelpMessage() string
HTTPSCertificateHelpMessage returns a help message for configuring HTTP over TLS Certificates.
func PEMBlockForKey ¶ added in v0.0.28
PEMBlockForKey returns a PEM-encoded block for key.
Types ¶
This section is empty.