Documentation
¶
Overview ¶
Package testcert makes a throwaway self-signed certificate for TLS tests. The certificate is valid for 127.0.0.1, ::1 and localhost. Tests in http/ and grpcws/ share it, so it imports nothing from servicekit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cert ¶
type Cert struct {
// CertFile and KeyFile are PEM files in the test's temp dir.
CertFile, KeyFile string
// Pair is the loaded certificate, for a server tls.Config.
Pair tls.Certificate
// Pool trusts only this certificate, for a client tls.Config.
Pool *x509.CertPool
}
Cert is a self-signed certificate and the ways a test needs to use it.