Documentation ¶
Overview ¶
Package haraldtest provides utilities for testing harald.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EchoChamber ¶
EchoChamber starts a new listener on a random port on the loopback address and returns the address it is listening on. The listener is only active for the first connection that is established to it. Any data received on the connection is sent back through it.
Types ¶
type CA ¶
type CA struct {
// contains filtered or unexported fields
}
func NewCertificateAuthority ¶
func (*CA) Certificate ¶
func (ca *CA) Certificate() *x509.Certificate
func (*CA) NewClientCertificate ¶
NewClientCertificate returns a new certificate and private key encoded as PEM. The certificate is valid and signed by the CA it is called on. The result can directly be passed to tls.X509KeyPair.
func (*CA) NewServerCertificate ¶
NewServerCertificate returns a new certificate and private key encoded as PEM. The certificate is valid and signed by the CA it is called on. The result can directly be passed to tls.X509KeyPair.