ccptest

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CA

type CA struct {
	// Root Certificate
	Certificate *x509.Certificate
	// contains filtered or unexported fields
}

CA represents a Certificate Authority for testing

func NewCA

func NewCA() (*CA, error)

NewCA creates a CA for testing client certifcates

func (*CA) NewClientCertificate

func (ca *CA) NewClientCertificate(cn string) ([]byte, []byte, error)

NewClientCertificate creates a new test client certificate

type Server

type Server struct {
	// Host is the hostname with an optional port number.
	Host string
	// contains filtered or unexported fields
}

Server is a mock CCP WebService implementation for testing purposes

func NewCCPServer

func NewCCPServer() *Server

NewCCPServer start a mock CCP Web Service

func (*Server) ClientCertificate

func (s *Server) ClientCertificate(cn string) ([]byte, []byte)

ClientCertificate creates a new test client certificate

func (*Server) Close

func (s *Server) Close()

Close shuts down the server and blocks until all outstanding requests on this server have completed.

func (*Server) ServerRootCA

func (s *Server) ServerRootCA() []byte

ServerRootCA returns the server's (root) Certificate

Jump to

Keyboard shortcuts

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