testing

package
v0.0.0-...-a20b76d Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var B3Certs = func() []*x509.Certificate {
	certPem, _ := ioutil.ReadFile("../../testdata/b3/fullchain.cert")
	certs, _ := signedexchange.ParseCertificates(certPem)
	return certs
}()

90 days cert of amppackageexample.com and www.amppackageexample.com in SAN

View Source
var B3Certs2 = func() []*x509.Certificate {
	certPem, _ := ioutil.ReadFile("../../testdata/b3/fullchain2.cert")
	certs, _ := signedexchange.ParseCertificates(certPem)
	return certs
}()

90 days cert of amppackageexample2.com and www.amppackageexample2.com in SAN

View Source
var B3Certs91Days = func() []*x509.Certificate {
	certPem, _ := ioutil.ReadFile("../../testdata/b3/fullchain_91days.cert")
	certs, _ := signedexchange.ParseCertificates(certPem)
	return certs
}()

91 days cert from B3Key

View Source
var B3Key = func() crypto.PrivateKey {
	keyPem, _ := ioutil.ReadFile("../../testdata/b3/server.privkey")
	key, _ := util.ParsePrivateKey(keyPem)
	return key
}()

Private key of B3Certs

View Source
var B3Key2 = func() crypto.PrivateKey {
	keyPem, _ := ioutil.ReadFile("../../testdata/b3/server2.privkey")
	key, _ := util.ParsePrivateKey(keyPem)
	return key
}()

Private key of B3Certs2

View Source
var B3KeyP521 = func() crypto.PrivateKey {
	keyPem, _ := ioutil.ReadFile("../../testdata/b3/server_p521.privkey")
	key, _ := util.ParsePrivateKey(keyPem)
	return key
}()

secp521r1 private key

View Source
var CertName = util.CertName(Certs[0])

The URL path component corresponding to the cert's sha-256.

View Source
var Certs = func() []*x509.Certificate {
	certPem, _ := ioutil.ReadFile("../../testdata/b3/fullchain.cert")
	certs, _ := signedexchange.ParseCertificates(certPem)
	return certs
}()

A cert (with its issuer chain) for testing.

View Source
var Key = func() crypto.PrivateKey {
	keyPem, _ := ioutil.ReadFile("../../testdata/b3/server.privkey")

	key, _ := util.ParsePrivateKey(keyPem)
	return key
}()

Its corresponding private key.

Functions

func Get

func Get(t *testing.T, handler http.Handler, target string) *http.Response

func GetBHH

func GetBHH(t *testing.T, handler http.Handler, target string, host string, body io.Reader, headers http.Header) *http.Response

func GetH

func GetH(t *testing.T, handler http.Handler, target string, headers http.Header) *http.Response

func GetHH

func GetHH(t *testing.T, handler http.Handler, target string, host string, headers http.Header) *http.Response

Types

This section is empty.

Jump to

Keyboard shortcuts

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