tls

package
v0.0.0-...-f852ded Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TLS

type TLS struct {
	// contains filtered or unexported fields
}

TLS satisfies the connection.Credentials interface for configuring grpc connections encrypted by TLS. It requires the public certificate of a certificate authority, and a certificate key pair signed by the given certificate authority. Communication is only allowed if the peer has a valid public key signed by the given certificate authority. The rsa subpackage contains code to generate certificates compatible with this authentication scheme.

func New

func New(ca, cert, key string) (TLS, error)

New creates a TLS instance from the given CA and signed certificate and key.

func (TLS) ClientOpts

func (tlsAuth TLS) ClientOpts() []grpc.DialOption

ClientOpts gets the grpc options for connecting as a client.

func (TLS) ServerOpts

func (tlsAuth TLS) ServerOpts() []grpc.ServerOption

ServerOpts gets the grpc options for creating a server.

Directories

Path Synopsis
Package io is used to ensure that the various pieces of code that interact with credentials read and write files to consistent locations.
Package io is used to ensure that the various pieces of code that interact with credentials read and write files to consistent locations.

Jump to

Keyboard shortcuts

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