refactor(netx): merge gocertifi into tlsx

This commit is contained in:
Simone Basso 2021-06-08 13:01:16 +02:00
parent 63cc692d66
commit 6620b0bbad
3 changed files with 5 additions and 5 deletions

View File

@ -33,12 +33,12 @@ import (
"github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go"
"github.com/ooni/probe-cli/v3/internal/engine/netx/bytecounter" "github.com/ooni/probe-cli/v3/internal/engine/netx/bytecounter"
"github.com/ooni/probe-cli/v3/internal/engine/netx/dialer" "github.com/ooni/probe-cli/v3/internal/engine/netx/dialer"
"github.com/ooni/probe-cli/v3/internal/engine/netx/gocertifi"
"github.com/ooni/probe-cli/v3/internal/engine/netx/httptransport" "github.com/ooni/probe-cli/v3/internal/engine/netx/httptransport"
"github.com/ooni/probe-cli/v3/internal/engine/netx/quicdialer" "github.com/ooni/probe-cli/v3/internal/engine/netx/quicdialer"
"github.com/ooni/probe-cli/v3/internal/engine/netx/resolver" "github.com/ooni/probe-cli/v3/internal/engine/netx/resolver"
"github.com/ooni/probe-cli/v3/internal/engine/netx/selfcensor" "github.com/ooni/probe-cli/v3/internal/engine/netx/selfcensor"
"github.com/ooni/probe-cli/v3/internal/engine/netx/tlsdialer" "github.com/ooni/probe-cli/v3/internal/engine/netx/tlsdialer"
"github.com/ooni/probe-cli/v3/internal/engine/netx/tlsx"
"github.com/ooni/probe-cli/v3/internal/engine/netx/trace" "github.com/ooni/probe-cli/v3/internal/engine/netx/trace"
"github.com/ooni/probe-cli/v3/internal/runtimex" "github.com/ooni/probe-cli/v3/internal/runtimex"
) )
@ -114,8 +114,8 @@ type tlsHandshaker interface {
// NewDefaultCertPool returns a copy of the default x509 // NewDefaultCertPool returns a copy of the default x509
// certificate pool. This function panics on failure. // certificate pool. This function panics on failure.
func NewDefaultCertPool() *x509.CertPool { func NewDefaultCertPool() *x509.CertPool {
pool, err := gocertifi.CACerts() pool, err := tlsx.CACerts()
runtimex.PanicOnError(err, "gocertifi.CACerts() failed") runtimex.PanicOnError(err, "tlsx.CACerts() failed")
return pool return pool
} }

View File

@ -2,7 +2,7 @@
// 2021-05-12 09:14:54.779668278 +0200 CEST m=+6.872930413 // 2021-05-12 09:14:54.779668278 +0200 CEST m=+6.872930413
// https://curl.haxx.se/ca/cacert.pem // https://curl.haxx.se/ca/cacert.pem
package gocertifi package tlsx
//go:generate go run generate.go "https://curl.haxx.se/ca/cacert.pem" //go:generate go run generate.go "https://curl.haxx.se/ca/cacert.pem"

View File

@ -26,7 +26,7 @@ var tmpl = template.Must(template.New("").Parse(`// Code generated by go generat
// {{ .Timestamp }} // {{ .Timestamp }}
// {{ .URL }} // {{ .URL }}
package gocertifi package tlsx
//go:generate go run generate.go "{{ .URL }}" //go:generate go run generate.go "{{ .URL }}"