File 0231-dtls-Add-handling-of-lost-key-exchange-in-cipher-sta.patch of Package erlang
From 8af2f67e15af0aba9555e9d1d00add894eeaa17e Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 7 Dec 2017 17:39:26 +0100
Subject: [PATCH 2/2] dtls: Add handling of lost key exchange in cipher state
---
lib/ssl/src/dtls_connection.erl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 6f22b60136..9cb6934dce 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -410,6 +410,12 @@ certify(info, Event, State) ->
handle_info(Event, certify, State);
certify(internal = Type, #server_hello_done{} = Event, State) ->
ssl_connection:certify(Type, Event, prepare_flight(State), ?MODULE);
+certify(internal, #change_cipher_spec{type = <<1>>}, State0) ->
+ {State1, Actions0} = send_handshake_flight(State0, retransmit_epoch(?FUNCTION_NAME, State0)),
+ {Record, State2} = next_record(State1),
+ {next_state, ?FUNCTION_NAME, State, Actions} = next_event(?FUNCTION_NAME, Record, State2, Actions0),
+ %% This will reset the retransmission timer by repeating the enter state event
+ {repeat_state, State, Actions};
certify(state_timeout, Event, State) ->
handle_state_timeout(Event, certify, State);
certify(Type, Event, State) ->
--
2.15.1