Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFiles ¶
func ParseFiles(ca, cert, key string) (*ParsedCertData, *RawCertData, error)
ParseFiles parses the given TLS-related files.
Types ¶
type ParsedCertData ¶
type ParsedCertData struct {
// contains filtered or unexported fields
}
ParsedCertData contains a parsed CA and TLS certificate.
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.
type RawCertData ¶ added in v0.3.0
type RawCertData struct {
// contains filtered or unexported fields
}
RawCertData contains a raw TLS certificate, private key, and CA.
func (*RawCertData) CA ¶ added in v0.3.0
func (c *RawCertData) CA() []byte
func (*RawCertData) Certificate ¶ added in v0.3.0
func (c *RawCertData) Certificate() []byte
func (*RawCertData) Key ¶ added in v0.3.0
func (c *RawCertData) Key() []byte
Click to show internal directories.
Click to hide internal directories.