Documentation ¶
Index ¶
- type TLSConfigLoader
- func (t *TLSConfigLoader) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
- func (t *TLSConfigLoader) GetClientCertificate(*tls.CertificateRequestInfo) (*tls.Certificate, error)
- func (t *TLSConfigLoader) GetClientTLSConfig() *tls.Config
- func (t *TLSConfigLoader) GetRootCAs() *x509.CertPool
- func (t *TLSConfigLoader) GetServerTLSConfig(clientAuthType tls.ClientAuthType) *tls.Config
- func (t *TLSConfigLoader) SetClientCACertificate(caCertificateFile string) error
- func (t *TLSConfigLoader) SetClientCertificate(certificateFile, keyFile string) error
- func (t *TLSConfigLoader) SetServerCACertificate(caCertificateFile string) error
- func (t *TLSConfigLoader) SetServerCertificate(certificateFile, keyFile string) error
- func (t *TLSConfigLoader) Stop()
- func (t *TLSConfigLoader) Watch() error
- type TestEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TLSConfigLoader ¶
type TLSConfigLoader struct {
// contains filtered or unexported fields
}
func NewTLSConfigLoader ¶
func NewTLSConfigLoader() (*TLSConfigLoader, error)
func (*TLSConfigLoader) GetCertificate ¶
func (t *TLSConfigLoader) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate returns the loaded certificate for use by the TLSConfig fields GetCertificate field in a http.Server.
func (*TLSConfigLoader) GetClientCertificate ¶
func (t *TLSConfigLoader) GetClientCertificate(*tls.CertificateRequestInfo) (*tls.Certificate, error)
GetClientCertificate returns the loaded certificate for use by the TLSConfig fields GetClientCertificate field in a http.Server.
func (*TLSConfigLoader) GetClientTLSConfig ¶ added in v0.3.6
func (t *TLSConfigLoader) GetClientTLSConfig() *tls.Config
GetTLSConfig returns a tls.Config with auto reloading certs.
func (*TLSConfigLoader) GetRootCAs ¶
func (t *TLSConfigLoader) GetRootCAs() *x509.CertPool
GetRootCAs returns the cert pool to use to verify certificates.
func (*TLSConfigLoader) GetServerTLSConfig ¶ added in v0.3.6
func (t *TLSConfigLoader) GetServerTLSConfig(clientAuthType tls.ClientAuthType) *tls.Config
func (*TLSConfigLoader) SetClientCACertificate ¶ added in v0.3.6
func (t *TLSConfigLoader) SetClientCACertificate(caCertificateFile string) error
func (*TLSConfigLoader) SetClientCertificate ¶ added in v0.3.6
func (t *TLSConfigLoader) SetClientCertificate(certificateFile, keyFile string) error
func (*TLSConfigLoader) SetServerCACertificate ¶ added in v0.3.6
func (t *TLSConfigLoader) SetServerCACertificate(caCertificateFile string) error
func (*TLSConfigLoader) SetServerCertificate ¶ added in v0.3.6
func (t *TLSConfigLoader) SetServerCertificate(certificateFile, keyFile string) error
func (*TLSConfigLoader) Stop ¶
func (t *TLSConfigLoader) Stop()
Stop stops watching for changes to the certificate and key files.
func (*TLSConfigLoader) Watch ¶
func (t *TLSConfigLoader) Watch() error
On any change the certificate and key are reloaded. If there is an issue the load will fail and the old (if any) certificates and keys will continue to be used.
Click to show internal directories.
Click to hide internal directories.