deftls

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package deftls.

This package provides some useful function for configuring tls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(opts ...Option) (*tls.Config, error)

Config return default tls config with default options.

Types

type Option

type Option func(*tls.Config) error

func UseCertFile

func UseCertFile(certfilePath, keyfilePath string) Option

UseCertFile option, use certfilePath and keyfilePath as certificate.

func UseCertPem

func UseCertPem(certpem, keypem string) Option

UseCertPem option, use certpem and keypem as certificate.

func UseCertSelfSigned

func UseCertSelfSigned() Option

UseCertSelfSigned option, use auto-generated self-signed certificate.

Jump to

Keyboard shortcuts

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