implement closing of the TLS crypto setup

When the crypto setup is closed, the go rounine running the
qtls.Handshake() needs to return.
This commit is contained in:
Marten Seemann
2018-10-28 12:41:40 +07:00
parent 35c0721b88
commit 4a326ad00a
3 changed files with 43 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package handshake
import (
"crypto/x509"
"io"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/marten-seemann/qtls"
@@ -44,6 +45,7 @@ type CryptoSetup interface {
type CryptoSetupTLS interface {
baseCryptoSetup
io.Closer
HandleMessage([]byte, protocol.EncryptionLevel) bool
OpenInitial(dst, src []byte, pn protocol.PacketNumber, ad []byte) ([]byte, error)
OpenHandshake(dst, src []byte, pn protocol.PacketNumber, ad []byte) ([]byte, error)