testutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testutil provides helper functions for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignKeysetsFromPEMs

func SignKeysetsFromPEMs(privPEMs ...string) []tink.Signer

SignKeysetsFromPEMs produces a slice of keysets, each with one private key.

func VerifyKeysetFromPEMs

func VerifyKeysetFromPEMs(pubPEMs ...string) *keyset.Handle

VerifyKeysetFromPEMs produces a Keyset with pubPEMs.

Types

type FakeKT

type FakeKT struct {
	Server pb.KeyTransparencyServer
	Client pb.KeyTransparencyClient
	Addr   string
}

FakeKT runs a fake KeyTransparency server.

func NewFakeKT

func NewFakeKT(ktServer pb.KeyTransparencyServer) (*FakeKT, func(), error)

NewFakeKT returns a new fake Key Transparency server listening on a random port. Returns the started server and a close function.

Jump to

Keyboard shortcuts

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