From: Sergey Matveev Date: Tue, 8 Aug 2023 20:00:29 +0000 (+0300) Subject: Up to date Go X-Git-Tag: v0.1.0^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=ucspi.git;a=commitdiff_plain;h=ef2a022b68db03ec5b2aa9fb16f23ca041ef338c Up to date Go --- diff --git a/cmd/tlsc/main.go b/cmd/tlsc/main.go index efeeb99..21a63ec 100644 --- a/cmd/tlsc/main.go +++ b/cmd/tlsc/main.go @@ -95,7 +95,7 @@ func main() { cfg.VerifyPeerCertificate = func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { spki := verifiedChains[0][0].RawSubjectPublicKeyInfo hshTheir := sha256.Sum256(spki) - if bytes.Compare(hshOur, hshTheir[:]) != 0 { + if !bytes.Equal(hshOur, hshTheir[:]) { return errors.New("server certificate's SPKI hash mismatch") } return nil diff --git a/conn.go b/conn.go index 6b61da0..7076336 100644 --- a/conn.go +++ b/conn.go @@ -24,8 +24,6 @@ import ( "time" ) -var aLongTimeAgo = time.Unix(1, 0) - type Addr struct { ip string port string diff --git a/go.mod b/go.mod index 64c05b0..54474dc 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module go.cypherpunks.ru/ucspi -go 1.16 +go 1.20