From fe6d378a1fa4296ea74390a3efd2e9c66b8637d0 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 22 Aug 2022 12:52:37 +0200 Subject: [PATCH] chore: use {go,oohttp,oocrypto} v1.18.5 (#872) * chore: use {go,oohttp,oocrypto} v1.18.5 This diff pins OONI to use go1.18.5 and oohttp and oocrypto at go1.18.5 as the version of go with which we build releases. The same codebase also works with go1.19 although this configuration cannot include Psiphon (see https://github.com/ooni/probe/issues/2222). Closes https://github.com/ooni/probe/issues/2223. * fix: use oocrypto@v0.1.1 This ensures we keep https://github.com/ooni/probe/issues/2122 fixed. --- GOVERSION | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- internal/netxlite/utls_test.go | 29 +++++++++++++++++------------ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/GOVERSION b/GOVERSION index b9fb27a..8e8b0a9 100644 --- a/GOVERSION +++ b/GOVERSION @@ -1 +1 @@ -1.18.3 +1.18.5 diff --git a/go.mod b/go.mod index 17d1f71..c91f2d7 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,8 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 github.com/montanaflynn/stats v0.6.6 github.com/ooni/go-libtor v1.1.5 - github.com/ooni/oocrypto v0.2.1 - github.com/ooni/oohttp v0.3.0 + github.com/ooni/oocrypto v0.1.1 + github.com/ooni/oohttp v0.2.1 github.com/ooni/probe-assets v0.11.0 github.com/ooni/psiphon/tunnel-core v0.0.0-20220819091114-7dccc0b6b6cd github.com/oschwald/geoip2-golang v1.8.0 diff --git a/go.sum b/go.sum index f697e7a..9ac91e1 100644 --- a/go.sum +++ b/go.sum @@ -621,10 +621,10 @@ github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/ooni/go-libtor v1.1.5 h1:YbwXR9aLuL37EwL7rksPCQQhcHwoxU+M/v+jwZR+n5Y= github.com/ooni/go-libtor v1.1.5/go.mod h1:q1YyLwRD9GeMyeerVvwc0vJ2YgwDLTp2bdVcrh/JXyI= -github.com/ooni/oocrypto v0.2.1 h1:jCx/s8SlZ81r6ECXkA8kiiz64D5q8CelcyQyKyl8sk8= -github.com/ooni/oocrypto v0.2.1/go.mod h1:NwhJ7wswn0Tlbc5Md2EIGZvvhTUE2CDUuNJM9jkbIFc= -github.com/ooni/oohttp v0.3.0 h1:75OsZKelkLXl6p2UD53dTJyIv+9owWqaL6sMT26LN8w= -github.com/ooni/oohttp v0.3.0/go.mod h1:fgNDPYw+nsgEKCDBpT/4R06bgnrCRtvgNmAWOCmm4JE= +github.com/ooni/oocrypto v0.1.1 h1:zYU9fxEGNHAd73gB8aRfbvvvAzdqRe/EXVlY64cMn7c= +github.com/ooni/oocrypto v0.1.1/go.mod h1:tP8tp455ERRdy38YWJQtQHb5LB6I5DvI4ffrnouypnM= +github.com/ooni/oohttp v0.2.1 h1:MGvRAXJdLFNqKeS5HXynIt8y7JIknmdTwC7DRpzDBko= +github.com/ooni/oohttp v0.2.1/go.mod h1:fgNDPYw+nsgEKCDBpT/4R06bgnrCRtvgNmAWOCmm4JE= github.com/ooni/probe-assets v0.11.0 h1:IM2d455Zeiu1bb115aYdO+Aj35fgPTTmh2q3F7a5JnI= github.com/ooni/probe-assets v0.11.0/go.mod h1:gI9d0ZNBkMsNgK5Me3m3K+QqWzFwHKP7KGZgyCB7IH4= github.com/ooni/psiphon/tunnel-core v0.0.0-20220819091114-7dccc0b6b6cd h1:zKGpY8HLA6dSStqV8df1BzfUz2lZ9Yh9XeokLhAOHls= diff --git a/internal/netxlite/utls_test.go b/internal/netxlite/utls_test.go index 570cf36..4d03d51 100644 --- a/internal/netxlite/utls_test.go +++ b/internal/netxlite/utls_test.go @@ -10,7 +10,6 @@ import ( "time" "github.com/apex/log" - "github.com/ooni/probe-cli/v3/internal/model/mocks" utls "gitlab.com/yawning/utls.git" ) @@ -94,17 +93,23 @@ func TestUTLSConn(t *testing.T) { }) }) - t.Run("NetConn", func(t *testing.T) { - factory := newConnUTLS(&utls.HelloChrome_70) - conn := &mocks.Conn{} - tconn, err := factory(conn, &tls.Config{}) - if err != nil { - t.Fatal(err) - } - if tconn.NetConn() != conn { - t.Fatal("NetConn is not WAI") - } - }) + // TODO(https://github.com/ooni/probe/issues/2222): we cannot enable + // this test until we use oocrypto >= v0.2 which uses go1.19. In turn, + // we cannot use go1.19 as our main version until we upgrade psiphon + // such that it builds using go1.19, which is the issue in #2222. + /* + t.Run("NetConn", func(t *testing.T) { + factory := newConnUTLS(&utls.HelloChrome_70) + conn := &mocks.Conn{} + tconn, err := factory(conn, &tls.Config{}) + if err != nil { + t.Fatal(err) + } + if tconn.NetConn() != conn { + t.Fatal("NetConn is not WAI") + } + }) + */ } func Test_newConnUTLSWithHelloID(t *testing.T) {