()
| 758 | } |
| 759 | |
| 760 | func tlsClientConfig() *tls.Config { |
| 761 | rootCAs := x509.NewCertPool() |
| 762 | if ok := rootCAs.AppendCertsFromPEM(internal.LocalhostCert); !ok { |
| 763 | panic("could not parse cert") |
| 764 | } |
| 765 | if ok := rootCAs.AppendCertsFromPEM(internal.LocalhostCert2); !ok { |
| 766 | panic("could not parse cert") |
| 767 | } |
| 768 | return &tls.Config{RootCAs: rootCAs} |
| 769 | } |
| 770 | |
| 771 | func tlsServerConfig() *tls.Config { |
| 772 | cert, err := tls.X509KeyPair(internal.LocalhostCert, internal.LocalhostKey) |
no outgoing calls
no test coverage detected