(t *testing.T, s *httptest.Server)
| 287 | } |
| 288 | |
| 289 | func rootCAs(t *testing.T, s *httptest.Server) *x509.CertPool { |
| 290 | certs := x509.NewCertPool() |
| 291 | for _, c := range s.TLS.Certificates { |
| 292 | roots, err := x509.ParseCertificates(c.Certificate[len(c.Certificate)-1]) |
| 293 | if err != nil { |
| 294 | t.Fatalf("error parsing server's root cert: %v", err) |
| 295 | } |
| 296 | for _, root := range roots { |
| 297 | certs.AddCert(root) |
| 298 | } |
| 299 | } |
| 300 | return certs |
| 301 | } |
| 302 | |
| 303 | func TestDialTLS(t *testing.T) { |
| 304 | s := newTLSServer(t) |
no outgoing calls
no test coverage detected