Documentation
¶
Index ¶
- Constants
- func CertificateSubjectToPkixName(subject *clientpb.CertificateSubject) *pkix.Name
- func GenerateClientCert(host, name string, port int) (*mtls.ClientConfig, error)
- func GenerateListenerCert(host, name string, port int) (*mtls.ClientConfig, error)
- func GenerateRootCert() error
- func GenerateSelfTLS(name string, certsSubject *clientpb.CertificateSubject) (*clientpb.TLS, error)
- func GenerateServerCert(name string) ([]byte, []byte, error)
- func GetACMEDir() string
- func GetAcmeTls(config *clientpb.TLS) (*clientpb.TLS, error)
- func GetCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error)
- func GetCertificateAuthorityPEM(caCertPath, caKeyPath string) ([]byte, []byte, error)
- func GetOperatorServerMTLSConfig(host string) *tls.Config
- func GetTlsConfig(config *types.CertConfig) (*tls.Config, error)
- func ParseCertificateAuthority(certPEM, keyPEM []byte) (*x509.Certificate, *rsa.PrivateKey, error)
- func SaveCertificateAuthority(caType int, cert []byte, key []byte)
- func TlsConfig(cert tls.Certificate) *tls.Config
- func WrapWithTls(lsn net.Listener, cert *types.CertConfig) (net.Listener, error)
- type ACMEManager
Constants ¶
View Source
const ( // ACMEDirName - Name of dir to store ACME certs ACMEDirName = "acme" ACMERootPath = "/.well-known/acme-challenge/" )
Variables ¶
This section is empty.
Functions ¶
func CertificateSubjectToPkixName ¶ added in v0.1.1
func CertificateSubjectToPkixName(subject *clientpb.CertificateSubject) *pkix.Name
func GenerateClientCert ¶
func GenerateClientCert(host, name string, port int) (*mtls.ClientConfig, error)
func GenerateListenerCert ¶
func GenerateListenerCert(host, name string, port int) (*mtls.ClientConfig, error)
func GenerateRootCert ¶
func GenerateRootCert() error
func GenerateSelfTLS ¶ added in v0.1.1
func GetCertificateAuthority ¶
func GetCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error)
GetCertificateAuthority - Get the current CA certificate
func GetCertificateAuthorityPEM ¶
GetCertificateAuthorityPEM - Get PEM encoded CA cert/key
func GetOperatorServerMTLSConfig ¶
GetOperatorServerMTLSConfig - Get the TLS config for the operator server
func GetTlsConfig ¶ added in v0.1.0
func GetTlsConfig(config *types.CertConfig) (*tls.Config, error)
func ParseCertificateAuthority ¶
func ParseCertificateAuthority(certPEM, keyPEM []byte) (*x509.Certificate, *rsa.PrivateKey, error)
func SaveCertificateAuthority ¶
SaveCertificateAuthority - Save the certificate and the key to the filesystem doesn't return an error because errors are fatal. If we can't generate CAs, then we can't secure communication and we should die a horrible death.
func WrapWithTls ¶
Types ¶
type ACMEManager ¶ added in v0.1.1
type ACMEManager struct {
// contains filtered or unexported fields
}
func GetACMEManager ¶ added in v0.1.1
func GetACMEManager() *ACMEManager
func (*ACMEManager) GetManager ¶ added in v0.1.1
func (a *ACMEManager) GetManager() *autocert.Manager
func (*ACMEManager) RegisterDomain ¶ added in v0.1.1
func (a *ACMEManager) RegisterDomain(domain string)
Click to show internal directories.
Click to hide internal directories.