aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-01-08 10:34:11 +0100
committerIngela Anderton Andin <[email protected]>2019-01-08 10:34:11 +0100
commite2fdbdf1502ec46cf25a2cb399febd23b480469f (patch)
tree951d6c30fccd2007af3b0c5312582594cdaa4c65 /lib/ssl/src
parent7969ceefad3bd2a534242da19d4aede1d138765f (diff)
parent36d0611e009a7792408534c122a65a2b8ebd23a7 (diff)
downloadotp-e2fdbdf1502ec46cf25a2cb399febd23b480469f.tar.gz
otp-e2fdbdf1502ec46cf25a2cb399febd23b480469f.tar.bz2
otp-e2fdbdf1502ec46cf25a2cb399febd23b480469f.zip
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/tls_connection.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index b042baebcb..41542c65c1 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -1073,6 +1073,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}) ->