handshake: use new crypto/tls 0-RTT API (#4953)

* handshake: simplify method signature of cryptoSetup.handleEvent

* use the new crypto/tls 0-RTT API
This commit is contained in:
Marten Seemann
2025-02-14 03:17:01 +01:00
committed by GitHub
parent b32f1fa0e4
commit bf28da8346
10 changed files with 182 additions and 380 deletions

View File

@@ -0,0 +1,21 @@
package handshake
import (
"net"
"time"
)
type conn struct {
localAddr, remoteAddr net.Addr
}
var _ net.Conn = &conn{}
func (c *conn) Read([]byte) (int, error) { return 0, nil }
func (c *conn) Write([]byte) (int, error) { return 0, nil }
func (c *conn) Close() error { return nil }
func (c *conn) RemoteAddr() net.Addr { return c.remoteAddr }
func (c *conn) LocalAddr() net.Addr { return c.localAddr }
func (c *conn) SetReadDeadline(time.Time) error { return nil }
func (c *conn) SetWriteDeadline(time.Time) error { return nil }
func (c *conn) SetDeadline(time.Time) error { return nil }