aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_handshake.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-11-30 13:35:20 +0100
committerPéter Dimitrov <[email protected]>2019-01-11 09:59:12 +0100
commit88733e3e2e9b7e15fac74a42e813da4f19f86482 (patch)
tree5fc1ccf069bb05433d9858ec05d18e157429a34f /lib/ssl/src/tls_handshake.erl
parentc823b266f08c0a87218af9a64debac63328ef46f (diff)
downloadotp-88733e3e2e9b7e15fac74a42e813da4f19f86482.tar.gz
otp-88733e3e2e9b7e15fac74a42e813da4f19f86482.tar.bz2
otp-88733e3e2e9b7e15fac74a42e813da4f19f86482.zip
ssl: Process "supported_versions" before decoding
Change-Id: I465760b7001692367c68839219745e40abafdfa8
Diffstat (limited to 'lib/ssl/src/tls_handshake.erl')
-rw-r--r--lib/ssl/src/tls_handshake.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 644763651f..3766bc1302 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -401,14 +401,15 @@ get_tls_handshake_aux(_Version, Data, _, Acc) ->
decode_handshake({3, N}, ?HELLO_REQUEST, <<>>) when N < 4 ->
#hello_request{};
-decode_handshake(Version, ?CLIENT_HELLO,
+decode_handshake(Version, ?CLIENT_HELLO,
<<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
?BYTE(SID_length), Session_ID:SID_length/binary,
?UINT16(Cs_length), CipherSuites:Cs_length/binary,
?BYTE(Cm_length), Comp_methods:Cm_length/binary,
Extensions/binary>>) ->
Exts = ssl_handshake:decode_vector(Extensions),
- DecodedExtensions = ssl_handshake:decode_hello_extensions(Exts, Version, client_hello),
+ DecodedExtensions = ssl_handshake:decode_hello_extensions(Exts, Version, {Major, Minor},
+ client_hello),
#client_hello{
client_version = {Major,Minor},
random = Random,