build: upgrade dependency and build with go 1.21

This commit is contained in:
cyrilix committed 2023-08-21 23:15:03 +02:00
1 parent adb38c3820
commit 993cfaa9d4
353 files changed
+47533 -16238

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
//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.HandshakeContext(ctx); err != nil {
return err
}
if !cfg.InsecureSkipVerify {
if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
return err
}
}
return nil
}