mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-07 04:41:31 -05:00
* feat(groupware): start implementing JMAP websocket support for push notifications (unfinished) * groupware: add GetLatestEmailsSummaryForAllAccounts * add new vendored dependency: github.com/gorilla/websocket * jmap: add QueryEmailSummaries * openapi: start adding examples * openapi: add new tooling for api-examples.yaml injection * apidoc-process.ts: make it more typescript-y * bump @redocly/cli from 2.0.8 to latest 2.2.0
22 lines
375 B
Go
22 lines
375 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.HandshakeContext(ctx); err != nil {
|
|
return err
|
|
}
|
|
if !cfg.InsecureSkipVerify {
|
|
if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|