Documentation ¶
Overview ¶
Package tlsconfig provides more convenient way to create "tls.Config".
Usage:
package main import "fmt" import "go.ligato.io/vpp-agent/v3/cmd/agentctl/client/tlsconfig" func main() { tc, err := tlsconfig.New( tlsconfig.CA("/path/to/ca.crt"), tlsconfig.CertKey("/path/to/server.crt", "/path/to/server.key"), ) if err != nil { fmt.Printf("Error while creating TLS config: %v\n", err) return } fmt.Println("TLS config is ready to use") // `tc` usage }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
Option applies a modification on a tls.Config.
func CA ¶
CA adds CA certificate from file to tls.Config. If not using this Option, then TLS will be using the host's root CA set.
func SkipServerVerification ¶
func SkipServerVerification() Option
SkipServerVerification turns off verification of server's certificate chain and host name.
Click to show internal directories.
Click to hide internal directories.