aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-05-29 22:53:01 +0200
committerIngela Anderton Andin <[email protected]>2019-06-05 11:51:48 +0200
commit9fdfaa533a131aa1b6b73accf739bdf23be84fb6 (patch)
tree28c15447e71e4c2bb29d1f0137146942806b68c1 /lib/ssl/src/ssl_connection.erl
parentabbe8d424676a473bcebdf3b97996ac7a5a70f16 (diff)
downloadotp-9fdfaa533a131aa1b6b73accf739bdf23be84fb6.tar.gz
otp-9fdfaa533a131aa1b6b73accf739bdf23be84fb6.tar.bz2
otp-9fdfaa533a131aa1b6b73accf739bdf23be84fb6.zip
ssl: Fix broken return value
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r--lib/ssl/src/ssl_connection.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index a5f754d2e3..6deb355b8e 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -124,7 +124,7 @@ handshake(#sslsocket{pid = [Pid|_]} = Socket, Timeout) ->
connected ->
{ok, Socket};
{ok, Ext} ->
- {ok, Socket, Ext};
+ {ok, Socket, no_records(Ext)};
Error ->
Error
end.
@@ -709,6 +709,7 @@ handle_session(#server_hello{cipher_suite = CipherSuite,
{ExpectNPN, Protocol} = case Protocol0 of
undefined ->
+
{false, CurrentProtocol};
_ ->
{ProtoExt =:= npn, Protocol0}
@@ -3000,3 +3001,8 @@ new_emulated([], EmOpts) ->
EmOpts;
new_emulated(NewEmOpts, _) ->
NewEmOpts.
+
+no_records(Extensions) ->
+ maps:map(fun(_, Value) ->
+ ssl_handshake:extension_value(Value)
+ end, Extensions).