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

@@ -4,7 +4,7 @@ import "github.com/lucas-clemente/quic-go/internal/protocol"
// NewNullAEAD creates a NullAEAD
func NewNullAEAD(p protocol.Perspective, v protocol.VersionNumber) AEAD {
if v == protocol.VersionTLS {
if v.UsesTLS() {
return &nullAEADFNV64a{}
}
return &nullAEADFNV128a{