aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-09-23 14:31:52 +0200
committerIngela Anderton Andin <[email protected]>2014-10-08 15:15:37 +0200
commitfec1afc6585c77fb949c84659930e403550d5928 (patch)
treeb0a59cd1849b50ac363c75cb7b914d8b2db2eff7 /lib/ssl/src
parentee24a87a779d8d10461cadd47b3eb276e70baef8 (diff)
downloadotp-fec1afc6585c77fb949c84659930e403550d5928.tar.gz
otp-fec1afc6585c77fb949c84659930e403550d5928.tar.bz2
otp-fec1afc6585c77fb949c84659930e403550d5928.zip
ssl: Servers may include an empty SNI-extension
Diffstat (limited to 'lib/ssl/src')
-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,