tls

package
v0.1.0-RC1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL