tlsconfig

package
v1.4.2-0...-9ad8752 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.

As a reminder from https://golang.org/pkg/crypto/tls/#Config:

A Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified.
A Config may be reused; the tls package will also not modify it.

Index

Constants

This section is empty.

Variables

Default is a secure-enough TLS configuration.

Functions

func Client

func Client(options Options) (*tls.Config, error)

Client returns a TLS configuration meant to be used by a client.

func Server

func Server(options Options) (*tls.Config, error)

Server returns a TLS configuration meant to be used by a server.

Types

type Options

type Options struct {
	InsecureSkipVerify bool
	ClientAuth         tls.ClientAuthType
	CAFile             string
	CertFile           string
	KeyFile            string
}

Options represents the information needed to create client and server TLS configurations.

Jump to

Keyboard shortcuts

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