servicers

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ChallengeExpireTime = time.Minute * 5
View Source
const ChallengeLength = 512
View Source
const GatewayCertificateDuration = time.Hour * 97 // 4 days, lifetime of GW Certificate
View Source
const MinKeyLength = 1024
View Source
const TimeLength = 8 // length of time encoded in byte array from int64

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapperServer

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

func NewBootstrapperServer

func NewBootstrapperServer(privKey *rsa.PrivateKey) (*BootstrapperServer, error)

func (*BootstrapperServer) GetChallenge

func (srv *BootstrapperServer) GetChallenge(ctx context.Context, hwId *protos.AccessGatewayID) (*protos.Challenge, error)

generate challenge in the format of [randomText : timestamp : signature] the format is designed mainly for demo/interface design, subjects to change in the future

func (*BootstrapperServer) RequestSign

func (srv *BootstrapperServer) RequestSign(
	ctx context.Context, resp *protos.Response) (*protos.Certificate, error)

verify the response by client and return signed certificate if response is correct

Jump to

Keyboard shortcuts

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