Skip to content

Commit 4ca5fcb

Browse files
committed
Merge branch 'maint'
2 parents e89c619 + 85862a0 commit 4ca5fcb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/ssl/src/dtls_gen_connection.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ reinit_handshake_data(#state{static_env = #static_env{data_tag = DataTag},
599599
State#state{handshake_env = HsEnv#handshake_env{tls_handshake_history = ssl_handshake:init_handshake_history(),
600600
public_key_info = undefined,
601601
premaster_secret = undefined,
602+
expecting_finished = false,
602603
flight_buffer = new_flight()},
603604
protocol_specific = PS#{flight_state => initial_flight_state(DataTag)},
604605
protocol_buffers =

lib/ssl/src/tls_dtls_gen_connection.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ abbreviated({call, From}, Msg, State) ->
299299
handle_call(Msg, From, ?STATE(abbreviated), State);
300300
abbreviated(internal,
301301
#change_cipher_spec{type = <<1>>},
302-
#state{static_env = #static_env{protocol_cb = Connection},
303-
connection_states = ConnectionStates0,
304-
handshake_env = HsEnv} = State) ->
302+
#state{handshake_env = #handshake_env{expecting_finished = false} = HsEnv,
303+
static_env = #static_env{protocol_cb = Connection},
304+
connection_states = ConnectionStates0} = State) ->
305305
ConnectionStates1 =
306306
ssl_record:activate_pending_connection_state(ConnectionStates0, read, Connection),
307307
Connection:next_event(?STATE(abbreviated), no_record,
@@ -333,7 +333,7 @@ certify(Type, Event, State) ->
333333
cipher({call, From}, Msg, State) ->
334334
handle_call(Msg, From, ?STATE(cipher), State);
335335
cipher(internal, #change_cipher_spec{type = <<1>>},
336-
#state{handshake_env = HsEnv,
336+
#state{handshake_env = #handshake_env{expecting_finished = false} = HsEnv,
337337
static_env = #static_env{protocol_cb = Connection},
338338
connection_states = ConnectionStates0} = State) ->
339339
ConnectionStates =

lib/ssl/src/tls_gen_connection.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ reinit_handshake_data(#state{handshake_env = HsEnv} =State) ->
220220
handshake_env = HsEnv#handshake_env{tls_handshake_history =
221221
ssl_handshake:init_handshake_history(),
222222
public_key_info = undefined,
223-
premaster_secret = undefined}
223+
premaster_secret = undefined,
224+
expecting_finished = false}
224225
}.
225226

226227
select_sni_extension(#client_hello{extensions = #{sni := SNI}}) ->

0 commit comments

Comments
 (0)