diff options
author | Ingela Andin <[email protected]> | 2019-06-04 13:36:49 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-06-04 13:36:49 +0200 |
commit | eeabad389abdcf9aa7ef5c7c16ce3874d927b53e (patch) | |
tree | bd334427c99234be9734ba524ff70a7203714226 /lib/ssl/src | |
parent | c8ca7f3a2e4583c71e7aa740ede1a2630c09f064 (diff) | |
parent | 85857a544e27cc0b9a3637af4ea2aff927ec7951 (diff) | |
download | otp-eeabad389abdcf9aa7ef5c7c16ce3874d927b53e.tar.gz otp-eeabad389abdcf9aa7ef5c7c16ce3874d927b53e.tar.bz2 otp-eeabad389abdcf9aa7ef5c7c16ce3874d927b53e.zip |
Merge pull request #2269 from IngelaAndin/ingela/ssl/ret-ext/ERL-951
ssl: Fix broken return value
OTP-15862
Diffstat (limited to 'lib/ssl/src')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 7047c01657..cc4d60389e 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). |