Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParsedCertData ¶
type ParsedCertData struct {
// contains filtered or unexported fields
}
ParsedCertData contains a parsed CA and TLS certificate.
func ParseFiles ¶
func ParseFiles(ca, cert, key string) (*ParsedCertData, error)
ParseFiles parses the given TLS-related files.
func (*ParsedCertData) ClientConfig ¶
func (c *ParsedCertData) ClientConfig(sni string) *tls.Config
ClientConfig return a TLS configuration for a client.
func (*ParsedCertData) DNSNames ¶
func (c *ParsedCertData) DNSNames() []string
DNSNames returns the certificate DNS names.
func (*ParsedCertData) ServerConfig ¶
func (c *ParsedCertData) ServerConfig() *tls.Config
ServerConfig return a TLS configuration for a server.
Click to show internal directories.
Click to hide internal directories.