aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-01-02 18:45:25 +0100
committerIngela Anderton Andin <[email protected]>2018-04-27 13:32:41 +0200
commit828190a32c1ba77036c913b6f73711b78b5f27bf (patch)
treeaf2144937eefd703fccb5191f2f73a699b845eed /lib/ssl/src
parent030070142f4128213ac1052319d19ad1926996b3 (diff)
downloadotp-828190a32c1ba77036c913b6f73711b78b5f27bf.tar.gz
otp-828190a32c1ba77036c913b6f73711b78b5f27bf.tar.bz2
otp-828190a32c1ba77036c913b6f73711b78b5f27bf.zip
dtls: Trigger resend in abbreviated handshake if change_cipher_spec
is received to early.
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/dtls_connection.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 3b5a548f72..ee46320225 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -570,6 +570,12 @@ hello(internal, {handshake, {#client_hello{cookie = <<>>} = Handshake, _}}, Stat
hello(internal, {handshake, {#hello_verify_request{} = Handshake, _}}, State) ->
%% hello_verify should not be in handshake history
{next_state, ?FUNCTION_NAME, State, [{next_event, internal, Handshake}]};
+hello(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};
hello(info, Event, State) ->
gen_info(Event, ?FUNCTION_NAME, State);
hello(state_timeout, Event, State) ->