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

@@ -26,6 +26,11 @@ var SupportedVersions = []VersionNumber{
Version35,
}
// UsesTLS says if this QUIC version uses TLS 1.3 for the handshake
func (vn VersionNumber) UsesTLS() bool {
return vn == VersionTLS
}
// VersionNumberToTag maps version numbers ('32') to tags ('Q032')
func VersionNumberToTag(vn VersionNumber) uint32 {
v := uint32(vn)