aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-09-25 13:31:22 +0200
committerIngela Anderton Andin <[email protected]>2014-09-25 13:31:22 +0200
commit3b1328d0eaecede8e42b0838f9920e413a19c8d6 (patch)
tree6e9ab34d50ea8817d4b1f0718f2ca5fc88fa46e3 /lib/ssl/src/ssl_handshake.erl
parent97cdb49fdf1c348bd9910fcc9c06732876cf200b (diff)
parentb196730a325cfe74312c3a5f4b1273ba7c705ed6 (diff)
downloadotp-3b1328d0eaecede8e42b0838f9920e413a19c8d6.tar.gz
otp-3b1328d0eaecede8e42b0838f9920e413a19c8d6.tar.bz2
otp-3b1328d0eaecede8e42b0838f9920e413a19c8d6.zip
Merge branch 'ia/ssl/empty-sni-from-server/OTP-12198' into maint
* ia/ssl/empty-sni-from-server/OTP-12198: ssl: Servers may include an empty SNI-extension
Diffstat (limited to 'lib/ssl/src/ssl_handshake.erl')
-rw-r--r--lib/ssl/src/ssl_handshake.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 22673e46e2..88ccb94e0b 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -1732,6 +1732,9 @@ dec_hello_extensions(<<?UINT16(?EC_POINT_FORMATS_EXT), ?UINT16(Len),
#ec_point_formats{ec_point_format_list =
ECPointFormats}});
+dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len), Rest/binary>>, Acc) when Len == 0 ->
+ dec_hello_extensions(Rest, Acc#hello_extensions{sni = ""}); %% Server may send an empy SNI
+
dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len),
ExtData:Len/binary, Rest/binary>>, Acc) ->
<<?UINT16(_), NameList/binary>> = ExtData,