mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-18 16:31:06 +00:00
a687f0634c
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
22 lines
367 B
Go
22 lines
367 B
Go
//go:build !go1.17
|
|
// +build !go1.17
|
|
|
|
package websocket
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
)
|
|
|
|
func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error {
|
|
if err := tlsConn.Handshake(); err != nil {
|
|
return err
|
|
}
|
|
if !cfg.InsecureSkipVerify {
|
|
if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|