define a function to tell if a QUIC version uses the TLS 1.3 handshake

This commit is contained in:
Marten Seemann
2017-09-22 19:47:08 +07:00
parent c78a4b2b73
commit 8312e766ed
5 changed files with 18 additions and 4 deletions

View File

@@ -214,7 +214,7 @@ func (c *client) establishSecureConnection() error {
if ev.err != nil {
return ev.err
}
if c.version != protocol.VersionTLS && ev.encLevel != protocol.EncryptionSecure {
if c.version.UsesTLS() && ev.encLevel != protocol.EncryptionSecure {
return fmt.Errorf("Client BUG: Expected encryption level to be secure, was %s", ev.encLevel)
}
return nil