Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
add missing check for the client's supported TLS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Oct 25, 2023
1 parent 174a6a1 commit 49f389c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion handshake_server_tls13.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,15 @@ GroupSelection:
}

if c.quic != nil {
// RFC 9001 Section 4.2: Clients MUST NOT offer TLS versions older than 1.3.
for _, v := range hs.clientHello.supportedVersions {
if v < VersionTLS13 {
c.sendAlert(alertProtocolVersion)
return errors.New("tls: client offered TLS version older than TLS 1.3")
}
}
// RFC 9001 Section 8.2.
if hs.clientHello.quicTransportParameters == nil {
// RFC 9001 Section 8.2.
c.sendAlert(alertMissingExtension)
return errors.New("tls: client did not send a quic_transport_parameters extension")
}
Expand Down

0 comments on commit 49f389c

Please sign in to comment.