You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this fragment during processing SNI extension the ServerNameListLength field is processed as a count of list elements (variable numNames). But this field contains the size of list in bytes (tested in wireshark with TLS 1.2).
This code will work in case SNI contains only one element with type HostName in the list, otherwise the handshake will fail.
The text was updated successfully, but these errors were encountered:
The previous code had a brain fart: it took one of the length prefixes
as an element count, not a length. This didn't actually affect anything
because the loop stops as soon as it finds a hostname element, and the
hostname element is always the first and only element. (No other element
types have ever been defined.)
This change fixes the parsing in case SNI is ever changed in the future.
Fixesgolang#10793.
Change-Id: Iafdf3381942bc22b1f33595315c53dc6cc2e9f0f
Reviewed-on: https://go-review.googlesource.com/11059
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The previous code had a brain fart: it took one of the length prefixes
as an element count, not a length. This didn't actually affect anything
because the loop stops as soon as it finds a hostname element, and the
hostname element is always the first and only element. (No other element
types have ever been defined.)
This change fixes the parsing in case SNI is ever changed in the future.
Fixesgolang#10793.
Change-Id: Iafdf3381942bc22b1f33595315c53dc6cc2e9f0f
Reviewed-on: https://go-review.googlesource.com/11059
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Source file: crypto/tls/handshake_messages.go
Function:
func (m *clientHelloMsg) unmarshal(data []byte) bool {...}
Code fragment:
In this fragment during processing SNI extension the ServerNameListLength field is processed as a count of list elements (variable numNames). But this field contains the size of list in bytes (tested in wireshark with TLS 1.2).
This code will work in case SNI contains only one element with type HostName in the list, otherwise the handshake will fail.
The text was updated successfully, but these errors were encountered: