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 CACert = func() *x509.Certificate { certPem, _ := ioutil.ReadFile("../../testdata/b3/ca.cert") certs, _ := signedexchange.ParseCertificates(certPem) return certs[0] }()
Cert for a fake CA
View Source
var CAKey = func() *rsa.PrivateKey { keyPem, _ := ioutil.ReadFile("../../testdata/b3/ca.privkey") for { var pemBlock *pem.Block pemBlock, keyPem := pem.Decode(keyPem) if pemBlock == nil { panic("Error parsing PEM block in ca.privkey.") } if key, err := x509.ParsePKCS1PrivateKey(pemBlock.Bytes); err == nil { return key } if len(keyPem) == 0 { panic("Failed to parse ca.privkey; no matching PEM blocks.") } } }()
RSA private key for a fake CA
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 ¶
This section is empty.
Types ¶
type FakeClock ¶
func NewFakeClock ¶
func NewFakeClock() *FakeClock
type Request ¶
type Request struct { T *testing.T Handler http.Handler Target string Host string Header http.Header Body io.Reader }
Request encapsulates all the information needed to construct a test request for use by the unit tests.
func NewRequest ¶
NewRequest returns a new test request.
Click to show internal directories.
Click to hide internal directories.