Documentation ¶
Overview ¶
Package tlscerts provides a store for TLS certificates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // CertLists is a list of TLS certificate lists. CertLists []TLSCertListConfig `json:"certLists"` // X509CertPools is a list of X.509 certificate pools. X509CertPools []X509CertPoolConfig `json:"x509CertPools"` }
Config is the configuration for the TLS certificate store.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store for TLS certificates.
func (*Store) GetCertList ¶
func (s *Store) GetCertList(name string) (certs []tls.Certificate, getCert func(*tls.ClientHelloInfo) (*tls.Certificate, error), ok bool)
GetCertList gets a TLS server certificate list by name.
func (*Store) GetClientCertList ¶
func (s *Store) GetClientCertList(name string) (certs []tls.Certificate, getClientCert func(*tls.CertificateRequestInfo) (*tls.Certificate, error), ok bool)
GetClientCertList gets a TLS client certificate list by name.
type TLSCertConfig ¶
type TLSCertConfig struct { // CertPath is the path to the PEM-encoded certificate. CertPath string `json:"certPath"` // KeyPath is the path to the PEM-encoded private key. KeyPath string `json:"keyPath"` }
TLSCertConfig is the configuration for a TLS certificate.
func (*TLSCertConfig) Load ¶
func (c *TLSCertConfig) Load() (cert tls.Certificate, err error)
Load loads the TLS certificate.
type TLSCertListConfig ¶
type TLSCertListConfig struct { // Name is the name of the certificate list. Name string `json:"name"` // Certs is a list of TLS certificates. Certs []TLSCertConfig `json:"certs"` }
TLSCertListConfig is the configuration for a list of TLS certificates.
func (*TLSCertListConfig) Load ¶
func (c *TLSCertListConfig) Load() (certs []tls.Certificate, err error)
Load loads the TLS certificate list.
type X509CertPoolConfig ¶
type X509CertPoolConfig struct { // Name is the name of the certificate pool. Name string `json:"name"` // CertPaths is a list of paths to PEM-encoded certificates. CertPaths []string `json:"certPaths"` }
X509CertPoolConfig is the configuration for an X.509 certificate pool.
Click to show internal directories.
Click to hide internal directories.