MCPcopy
hub / github.com/gorilla/websocket / rootCAs

Function rootCAs

client_server_test.go:289–301  ·  client_server_test.go::rootCAs
(t *testing.T, s *httptest.Server)

Source from the content-addressed store, hash-verified

287}
288
289func 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
303func TestDialTLS(t *testing.T) {
304 s := newTLSServer(t)

Callers 5

TestDialTLSFunction · 0.85
TestHostFunction · 0.85
TestNetDialConnectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected