Documentation
¶
Index ¶
- func ContextValue(c *Config) cli.Action
- func FlagsAndArgs() cli.Action
- func ListCiphers() cli.Action
- func ListCurves() cli.Action
- func SetCACertFile(path ...string) cli.Action
- func SetCACertPath(path ...string) cli.Action
- func SetCiphers(v ...CipherSuites) cli.Action
- func SetClientCertFile(path ...string) cli.Action
- func SetCurves(v ...CurveIDs) cli.Action
- func SetInsecureSkipVerify(v ...bool) cli.Action
- func SetKeyFile(path ...string) cli.Action
- func SetNextProtos(s ...[]string) cli.Action
- func SetServerName(s ...string) cli.Action
- func SetTLSv1() cli.Action
- func SetTLSv1_0() cli.Action
- func SetTLSv1_1() cli.Action
- func SetTLSv1_2() cli.Action
- func SetTLSv1_3() cli.Action
- func SetTime(s ...*cli.File) cli.Action
- func SourceAnnotation() (string, string)
- type CipherSuites
- type Config
- type CurveIDs
- type Option
- func AddCertificate(cert gotls.Certificate) Option
- func AddRootCACertFile(filename string) Option
- func AddRootCACertPath(path string) Option
- func AddX509KeyPair(certFile, keyFile string) Option
- func WithAction(a cli.Action) Option
- func WithCiphers(ids CipherSuites) Option
- func WithCurves(ids CurveIDs) Option
- func WithDefaultAction() Option
- func WithInsecureSkipVerify(v bool) Option
- func WithNextProtos(s []string) Option
- func WithServerName(s string) Option
- func WithTimeHelper(f *cli.File) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextValue ¶
func FlagsAndArgs ¶
func ListCiphers ¶
func ListCurves ¶
func SetCACertFile ¶
func SetCACertPath ¶
func SetCiphers ¶
func SetCiphers(v ...CipherSuites) cli.Action
func SetClientCertFile ¶
func SetInsecureSkipVerify ¶
func SetKeyFile ¶
func SetNextProtos ¶
func SetServerName ¶
func SetTLSv1_0 ¶
func SetTLSv1_1 ¶
func SetTLSv1_2 ¶
func SetTLSv1_3 ¶
func SourceAnnotation ¶
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 ¶
Config reepresents TLS configuration plus a default action.
func FromContext ¶
FromContext obtains the server from the context.
type Option ¶
Option provides an option to the TLS configuration
func AddCertificate ¶ added in v0.7.2
func AddCertificate(cert gotls.Certificate) Option
AddCertificate adds a certificate to the pool
func AddRootCACertFile ¶ added in v0.7.2
AddRootCACertFile adds a CA certificate to the pool
func AddRootCACertPath ¶ added in v0.7.2
AddRootCACertPath adds a search path to the CA certificate pool
func AddX509KeyPair ¶ added in v0.7.2
AddX509KeyPair adds a certificate to the pool
func WithDefaultAction ¶ added in v0.7.3
func WithDefaultAction() Option
WithDefaultAction sets the action to the default
func WithInsecureSkipVerify ¶
WithInsecureSkipVerify sets up the option to skip verification in TLS handshake. This option is insecure.
func WithTimeHelper ¶
WithTimeHelper specifies the file whose modtime contains the time for the server