diff --git a/go.mod b/go.mod index 92520647c1..941258988c 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/libp2p/go-reuseport v0.2.0 github.com/libp2p/go-yamux/v4 v4.0.0 github.com/libp2p/zeroconf/v2 v2.2.0 - github.com/lucas-clemente/quic-go v0.31.0 + github.com/lucas-clemente/quic-go v0.31.1 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd github.com/marten-seemann/webtransport-go v0.4.2 github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b diff --git a/go.sum b/go.sum index 3bfd1c475c..76783b2be0 100644 --- a/go.sum +++ b/go.sum @@ -321,8 +321,8 @@ github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rB github.com/libp2p/go-yamux/v4 v4.0.0/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/libp2p/zeroconf/v2 v2.2.0 h1:Cup06Jv6u81HLhIj1KasuNM/RHHrJ8T7wOTS4+Tv53Q= github.com/libp2p/zeroconf/v2 v2.2.0/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= -github.com/lucas-clemente/quic-go v0.31.0 h1:MfNp3fk0wjWRajw6quMFA3ap1AVtlU+2mtwmbVogB2M= -github.com/lucas-clemente/quic-go v0.31.0/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g= +github.com/lucas-clemente/quic-go v0.31.1 h1:O8Od7hfioqq0PMYHDyBkxU2aA7iZ2W9pjbrWuja2YR4= +github.com/lucas-clemente/quic-go v0.31.1/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/p2p/transport/webtransport/transport_test.go b/p2p/transport/webtransport/transport_test.go index 49b0df1080..b95e6e2c9e 100644 --- a/p2p/transport/webtransport/transport_test.go +++ b/p2p/transport/webtransport/transport_test.go @@ -177,7 +177,10 @@ func TestHashVerification(t *testing.T) { addr := stripCertHashes(ln.Multiaddr()).Encapsulate(foobarHash) _, err := tr2.Dial(context.Background(), addr, serverID) require.Error(t, err) - require.Contains(t, err.Error(), "CRYPTO_ERROR (0x12a): cert hash not found") + var trErr *quic.TransportError + require.ErrorAs(t, err, &trErr) + require.Equal(t, quic.TransportErrorCode(0x12a), trErr.ErrorCode) + require.Contains(t, trErr.ErrorMessage, "cert hash not found") }) t.Run("fails when adding a wrong hash", func(t *testing.T) {