From 9188d8174bb7e8fa28058cb5d2835905c68321b8 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Thu, 27 Dec 2018 09:40:01 +0100 Subject: ssl: Gurantee active once data delivery New internal active N changed timing, and new check is needed. --- lib/ssl/src/tls_connection.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ssl/src') diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 9edf48fdef..8b24151d9f 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -893,6 +893,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}) -> -- cgit v1.2.3