diff options
author | Ingela Anderton Andin <[email protected]> | 2018-12-27 09:40:01 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-01-08 15:22:20 +0100 |
commit | a1e2f6e6789e804a56b795905f56b891b21c738e (patch) | |
tree | effcdea19cfaad4409adb9238c0c2eb6263663c1 /lib/ssl/src/tls_connection.erl | |
parent | f0ea49125815ec9197ffb6c74e20ebb5f10732d4 (diff) | |
download | otp-a1e2f6e6789e804a56b795905f56b891b21c738e.tar.gz otp-a1e2f6e6789e804a56b795905f56b891b21c738e.tar.bz2 otp-a1e2f6e6789e804a56b795905f56b891b21c738e.zip |
ssl: Guarantee active once data delivery
New internal active N changed timing, and
new check is needed.
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 798b853026..80a8c6b72c 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -901,6 +901,12 @@ handle_alerts([], Result) -> Result; handle_alerts(_, {stop, _, _} = Stop) -> Stop; +handle_alerts([#alert{level = ?WARNING, description = ?CLOSE_NOTIFY} | _Alerts], + {next_state, connection = StateName, #state{user_data_buffer = Buffer, + protocol_buffers = #protocol_buffers{tls_cipher_texts = CTs}} = + State}) when (Buffer =/= <<>>) orelse + (CTs =/= []) -> + {next_state, StateName, State#state{terminated = true}}; handle_alerts([Alert | Alerts], {next_state, StateName, State}) -> handle_alerts(Alerts, ssl_connection:handle_alert(Alert, StateName, State)); handle_alerts([Alert | Alerts], {next_state, StateName, State, _Actions}) -> |