tls

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextValue

func ContextValue(c *Config) cli.Action

func FlagsAndArgs

func FlagsAndArgs() cli.Action

func ListCiphers

func ListCiphers() cli.Action

func ListCurves

func ListCurves() cli.Action

func SetCACertFile

func SetCACertFile(path ...string) cli.Action

func SetCACertPath

func SetCACertPath(path ...string) cli.Action

func SetCiphers

func SetCiphers(v ...*CipherSuites) cli.Action

func SetClientCertFile

func SetClientCertFile(path ...string) cli.Action

func SetCurves

func SetCurves(v ...*CurveIDs) cli.Action

func SetInsecureSkipVerify

func SetInsecureSkipVerify(v ...bool) cli.Action

func SetKeyFile

func SetKeyFile(path ...string) cli.Action

func SetNextProtos

func SetNextProtos(s ...[]string) cli.Action

func SetServerName

func SetServerName(s ...string) cli.Action

func SetTLSv1

func SetTLSv1() cli.Action

func SetTLSv1_0

func SetTLSv1_0() cli.Action

func SetTLSv1_1

func SetTLSv1_1() cli.Action

func SetTLSv1_2

func SetTLSv1_2() cli.Action

func SetTLSv1_3

func SetTLSv1_3() cli.Action

func SetTime

func SetTime(s ...*cli.File) cli.Action

func SourceAnnotation

func SourceAnnotation() (string, string)

SourceAnnotation gets the name and value of the annotation added to the Data of all flags that are initialized from this package

Types

type CipherSuites

type CipherSuites []uint16

func (*CipherSuites) Set

func (c *CipherSuites) Set(arg string) error

func (*CipherSuites) String

func (c *CipherSuites) String() string

func (*CipherSuites) Synopsis

func (c *CipherSuites) Synopsis() string

type Config

type Config struct {
	*gotls.Config
	cli.Action
}

func FromContext

func FromContext(ctx context.Context) *Config

FromContext obtains the server from the context.

func New

func New(opts ...Option) *Config

func (*Config) Apply

func (c *Config) Apply(opts ...Option)

type CurveIDs

type CurveIDs []tls.CurveID

func (*CurveIDs) Set

func (c *CurveIDs) Set(arg string) error

func (*CurveIDs) String

func (c *CurveIDs) String() string

func (*CurveIDs) Synopsis

func (c *CurveIDs) Synopsis() string

type Option

type Option func(*Config)

func WithCertificate

func WithCertificate(cert gotls.Certificate) Option

func WithCiphers

func WithCiphers(ids *CipherSuites) Option

func WithCurves

func WithCurves(ids *CurveIDs) Option

func WithInsecureSkipVerify

func WithInsecureSkipVerify(v bool) Option

func WithNextProtos

func WithNextProtos(s []string) Option

func WithRootCACertFile

func WithRootCACertFile(filename string) Option

func WithRootCACertPath

func WithRootCACertPath(path string) Option

func WithServerName

func WithServerName(s string) Option

func WithTimeHelper

func WithTimeHelper(f *cli.File) Option

func WithX509KeyPair

func WithX509KeyPair(certFile, keyFile string) Option

func (Option) Execute

func (o Option) Execute(c context.Context) error

Jump to

Keyboard shortcuts

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