MCPcopy
hub / github.com/fabiolb/fabio / makeCert

Function makeCert

cert/source_test.go:732–739  ·  view source on GitHub ↗
(host string, validFor time.Duration)

Source from the content-addressed store, hash-verified

730}
731
732func makeCert(host string, validFor time.Duration) tls.Certificate {
733 certPEM, keyPEM := makePEM(host, validFor)
734 cert, err := tls.X509KeyPair(certPEM, keyPEM)
735 if err != nil {
736 panic("Failed to create certificate: " + err.Error())
737 }
738 return cert
739}
740
741func waitFor(timeout time.Duration, up func() bool) bool {
742 until := time.Now().Add(timeout)

Callers 1

TestGetCertificateFunction · 0.85

Calls 2

makePEMFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected