protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition (#3764)

This commit is contained in:
Marten Seemann
2023-04-19 16:24:34 +02:00
committed by GitHub
parent a753cb13d8
commit 1f57d4e789
21 changed files with 68 additions and 77 deletions

View File

@@ -45,13 +45,15 @@ const (
)
func versionToALPN(v protocol.VersionNumber) string {
if v == protocol.Version1 || v == protocol.Version2 {
//nolint:exhaustive // These are all the versions we care about.
switch v {
case protocol.Version1, protocol.Version2:
return NextProtoH3
}
if v == protocol.VersionTLS || v == protocol.VersionDraft29 {
case protocol.VersionDraft29:
return NextProtoH3Draft29
default:
return ""
}
return ""
}
// ConfigureTLSConfig creates a new tls.Config which can be used