Skip to content

Commit

Permalink
Merge branch 'master' into brute-force-protection
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisole committed May 6, 2024
2 parents fe5a289 + 2c36d63 commit 257b73d
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 54 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT

name: API
on:
pull_request:

jobs:
check:
uses: pion/.goassets/.github/workflows/api.reusable.yml@master
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
release:
uses: pion/.goassets/.github/workflows/release.reusable.yml@master
with:
go-version: '1.20' # auto-update/latest-go-version
go-version: "1.22" # auto-update/latest-go-version
8 changes: 5 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ jobs:
uses: pion/.goassets/.github/workflows/test.reusable.yml@master
strategy:
matrix:
go: ['1.21', '1.20'] # auto-update/supported-go-version-list
go: ["1.22", "1.21"] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
secrets: inherit

test-i386:
uses: pion/.goassets/.github/workflows/test-i386.reusable.yml@master
strategy:
matrix:
go: ['1.21', '1.20'] # auto-update/supported-go-version-list
go: ["1.22", "1.21"] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}

test-wasm:
uses: pion/.goassets/.github/workflows/test-wasm.reusable.yml@master
with:
go-version: '1.20' # auto-update/latest-go-version
go-version: "1.22" # auto-update/latest-go-version
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/tidy-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
tidy:
uses: pion/.goassets/.github/workflows/tidy-check.reusable.yml@master
with:
go-version: '1.21' # auto-update/latest-go-version
go-version: "1.22" # auto-update/latest-go-version
7 changes: 3 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

linters-settings:
govet:
check-shadowing: true
enable:
- shadow
misspell:
locale: US
exhaustive:
Expand Down Expand Up @@ -110,6 +111,7 @@ linters:

issues:
exclude-use-default: false
exclude-dirs-use-default: false
exclude-rules:
# Allow complex tests and examples, better to be self contained
- path: (examples|main\.go|_test\.go)
Expand All @@ -121,6 +123,3 @@ issues:
- path: cmd
linters:
- forbidigo

run:
skip-dirs-use-default: false
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Pion
Source: https://github.com/pion/

Files: README.md DESIGN.md **/README.md AUTHORS.txt renovate.json go.mod go.sum **/go.mod **/go.sum .eslintrc.json package.json examples/examples.json
Files: README.md DESIGN.md **/README.md AUTHORS.txt renovate.json go.mod go.sum **/go.mod **/go.sum .eslintrc.json package.json examples.json sfu-ws/flutter/.gitignore sfu-ws/flutter/pubspec.yaml c-data-channels/webrtc.h examples/examples.json
Copyright: 2023 The Pion community <https://pion.ly>
License: MIT

Expand Down
2 changes: 1 addition & 1 deletion certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestGetCertificate(t *testing.T) {
},
{
desc: "Get certificate from callback",
getCertificate: func(info *ClientHelloInfo) (*tls.Certificate, error) {
getCertificate: func(*ClientHelloInfo) (*tls.Certificate, error) {
return &certificateTest, nil
},
expectedCertificate: certificateTest,
Expand Down
4 changes: 2 additions & 2 deletions cipher_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ func TestCustomCipherSuite(t *testing.T) {
}
}

t.Run("Custom ID", func(t *testing.T) {
t.Run("Custom ID", func(*testing.T) {
runTest(func() []CipherSuite {
return []CipherSuite{&testCustomCipherSuite{authenticationType: CipherSuiteAuthenticationTypeCertificate}}
})
})

t.Run("Anonymous Cipher", func(t *testing.T) {
t.Run("Anonymous Cipher", func(*testing.T) {
runTest(func() []CipherSuite {
return []CipherSuite{&testCustomCipherSuite{authenticationType: CipherSuiteAuthenticationTypeAnonymous}}
})
Expand Down
4 changes: 2 additions & 2 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ func TestValidateConfig(t *testing.T) {
"Valid config with get certificate": {
config: &Config{
CipherSuites: []CipherSuiteID{TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
GetCertificate: func(chi *ClientHelloInfo) (*tls.Certificate, error) {
GetCertificate: func(*ClientHelloInfo) (*tls.Certificate, error) {
return &tls.Certificate{Certificate: cert.Certificate, PrivateKey: rsaPrivateKey}, nil
},
},
},
"Valid config with get client certificate": {
config: &Config{
CipherSuites: []CipherSuiteID{TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
GetClientCertificate: func(cri *CertificateRequestInfo) (*tls.Certificate, error) {
GetClientCertificate: func(*CertificateRequestInfo) (*tls.Certificate, error) {
return &tls.Certificate{Certificate: cert.Certificate, PrivateKey: rsaPrivateKey}, nil
},
},
Expand Down
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ func (c *Conn) handshake(ctx context.Context, cfg *handshakeConfig, initialFligh
done := make(chan struct{})
ctxRead, cancelRead := context.WithCancel(context.Background())
c.cancelHandshakeReader = cancelRead
cfg.onFlightState = func(f flightVal, s handshakeState) {
cfg.onFlightState = func(_ flightVal, s handshakeState) {
if s == handshakeFinished && !c.isHandshakeCompletedSuccessfully() {
c.setHandshakeCompletedSuccessfully()
close(done)
Expand Down
20 changes: 10 additions & 10 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func TestHandshakeWithInvalidRecord(t *testing.T) {

var msgSeq atomic.Int32
// Send invalid record after first message
caWithInvalidRecord.onWrite = func(b []byte) {
caWithInvalidRecord.onWrite = func([]byte) {
if msgSeq.Add(1) == 2 {
if _, err := ca.Write([]byte{0x01, 0x02}); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -556,7 +556,7 @@ func TestPSK(t *testing.T) {
Name: "Server identity specified - Server verify connection fails",
ServerIdentity: []byte("Test Identity"),
CipherSuites: []CipherSuiteID{TLS_PSK_WITH_AES_128_CCM_8},
ServerVerifyConnection: func(s *State) error {
ServerVerifyConnection: func(*State) error {
return errExample
},
WantFail: true,
Expand All @@ -567,7 +567,7 @@ func TestPSK(t *testing.T) {
Name: "Server identity specified - Client verify connection fails",
ServerIdentity: []byte("Test Identity"),
CipherSuites: []CipherSuiteID{TLS_PSK_WITH_AES_128_CCM_8},
ClientVerifyConnection: func(s *State) error {
ClientVerifyConnection: func(*State) error {
return errExample
},
WantFail: true,
Expand Down Expand Up @@ -905,14 +905,14 @@ func TestClientCertificate(t *testing.T) {
Certificates: []tls.Certificate{srvCert},
ClientAuth: NoClientCert,
ClientCAs: caPool,
VerifyConnection: func(s *State) error {
VerifyConnection: func(*State) error {
return errExample
},
},
wantErr: true,
},
"NoClientCert_ClientVerifyConnectionFails": {
clientCfg: &Config{RootCAs: srvCAPool, VerifyConnection: func(s *State) error {
clientCfg: &Config{RootCAs: srvCAPool, VerifyConnection: func(*State) error {
return errExample
}},
serverCfg: &Config{
Expand Down Expand Up @@ -1014,10 +1014,10 @@ func TestClientCertificate(t *testing.T) {
clientCfg: &Config{
RootCAs: srvCAPool,
// Certificates: []tls.Certificate{cert},
GetClientCertificate: func(cri *CertificateRequestInfo) (*tls.Certificate, error) { return &cert, nil },
GetClientCertificate: func(*CertificateRequestInfo) (*tls.Certificate, error) { return &cert, nil },
},
serverCfg: &Config{
GetCertificate: func(chi *ClientHelloInfo) (*tls.Certificate, error) { return &srvCert, nil },
GetCertificate: func(*ClientHelloInfo) (*tls.Certificate, error) { return &srvCert, nil },
// Certificates: []tls.Certificate{srvCert},
ClientAuth: RequireAndVerifyClientCert,
ClientCAs: caPool,
Expand Down Expand Up @@ -1408,7 +1408,7 @@ func TestServerCertificate(t *testing.T) {
},
"good_ca_skip_verify_custom_verify_peer": {
clientCfg: &Config{RootCAs: caPool, Certificates: []tls.Certificate{cert}},
serverCfg: &Config{Certificates: []tls.Certificate{cert}, ClientAuth: RequireAnyClientCert, VerifyPeerCertificate: func(cert [][]byte, chain [][]*x509.Certificate) error {
serverCfg: &Config{Certificates: []tls.Certificate{cert}, ClientAuth: RequireAnyClientCert, VerifyPeerCertificate: func(_ [][]byte, chain [][]*x509.Certificate) error {
if len(chain) != 0 {
return errNotExpectedChain
}
Expand All @@ -1417,7 +1417,7 @@ func TestServerCertificate(t *testing.T) {
},
"good_ca_verify_custom_verify_peer": {
clientCfg: &Config{RootCAs: caPool, Certificates: []tls.Certificate{cert}},
serverCfg: &Config{ClientCAs: caPool, Certificates: []tls.Certificate{cert}, ClientAuth: RequireAndVerifyClientCert, VerifyPeerCertificate: func(cert [][]byte, chain [][]*x509.Certificate) error {
serverCfg: &Config{ClientCAs: caPool, Certificates: []tls.Certificate{cert}, ClientAuth: RequireAndVerifyClientCert, VerifyPeerCertificate: func(_ [][]byte, chain [][]*x509.Certificate) error {
if len(chain) == 0 {
return errExpecedChain
}
Expand Down Expand Up @@ -2996,7 +2996,7 @@ func TestMultipleServerCertificates(t *testing.T) {
c, err := testClient(context.TODO(), dtlsnet.PacketConnFromConn(ca), ca.RemoteAddr(), &Config{
RootCAs: caPool,
ServerName: test.RequestServerName,
VerifyPeerCertificate: func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
VerifyPeerCertificate: func(rawCerts [][]byte, _ [][]*x509.Certificate) error {
certificate, err := x509.ParseCertificate(rawCerts[0])
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/pion/dtls/v2/pkg/crypto/hash"
)

// nolint: gosec
const rawPrivateKey = `
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAxIA2BrrnR2sIlATsp7aRBD/3krwZ7vt9dNeoDQAee0s6SuYP
Expand Down
24 changes: 19 additions & 5 deletions errors_errno_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,32 @@ import (
)

func TestErrorsTemporary(t *testing.T) {
addrListen, errListen := net.ResolveUDPAddr("udp", "localhost:0")
if errListen != nil {
t.Fatalf("Unexpected error: %v", errListen)
// Allocate a UDP port no one is listening on.
addrListen, err := net.ResolveUDPAddr("udp", "localhost:0")
if err != nil {
t.Fatalf("Unexpected failure to resolve: %v", err)
}
listener, err := net.ListenUDP("udp", addrListen)
if err != nil {
t.Fatalf("Unexpected failure to listen: %v", err)
}
raddr, ok := listener.LocalAddr().(*net.UDPAddr)
if !ok {
t.Fatal("Unexpedted type assertion error")
}
err = listener.Close()
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}

// Server is not listening.
conn, errDial := net.DialUDP("udp", nil, addrListen)
conn, errDial := net.DialUDP("udp", nil, raddr)
if errDial != nil {
t.Fatalf("Unexpected error: %v", errDial)
}

_, _ = conn.Write([]byte{0x00}) // trigger
_, err := conn.Read(make([]byte, 10))
_, err = conn.Read(make([]byte, 10))
_ = conn.Close()

if err == nil {
Expand Down
16 changes: 11 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ module github.com/pion/dtls/v2

require (
github.com/pion/logging v0.2.2
github.com/pion/transport/v3 v3.0.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.18.0
golang.org/x/net v0.20.0
github.com/pion/transport/v3 v3.0.2
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.22.0
golang.org/x/net v0.24.0
)

go 1.13
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.19
31 changes: 17 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,37 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM=
github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0=
github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4=
github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -40,20 +44,19 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand Down
4 changes: 2 additions & 2 deletions handshaker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func TestHandshaker(t *testing.T) {
localSignatureSchemes: signaturehash.Algorithms(),
insecureSkipVerify: true,
log: logger,
onFlightState: func(f flightVal, s handshakeState) {
onFlightState: func(_ flightVal, s handshakeState) {
if s == handshakeFinished {
if clientEndpoint.OnFinished != nil {
clientEndpoint.OnFinished()
Expand Down Expand Up @@ -304,7 +304,7 @@ func TestHandshaker(t *testing.T) {
localSignatureSchemes: signaturehash.Algorithms(),
insecureSkipVerify: true,
log: logger,
onFlightState: func(f flightVal, s handshakeState) {
onFlightState: func(_ flightVal, s handshakeState) {
if s == handshakeFinished {
if serverEndpoint.OnFinished != nil {
serverEndpoint.OnFinished()
Expand Down
Loading

0 comments on commit 257b73d

Please sign in to comment.