diff options
author | Ingela Anderton Andin <[email protected]> | 2017-10-02 10:45:13 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-10-02 10:45:13 +0200 |
commit | 52dda64b51b30a90a093d3e928e3e75d817e9cc6 (patch) | |
tree | aa3cd50a7f8fa4715c21d5256b78172509202db3 /lib/ssl/src/ssl_connection.erl | |
parent | 0717a2194e863f3a78595184ccc5637697f03353 (diff) | |
parent | d9031e33817960578219f4c616449ae7f9efb3ea (diff) | |
download | otp-52dda64b51b30a90a093d3e928e3e75d817e9cc6.tar.gz otp-52dda64b51b30a90a093d3e928e3e75d817e9cc6.tar.bz2 otp-52dda64b51b30a90a093d3e928e3e75d817e9cc6.zip |
Merge branch 'ingela/dtls/renegotiate/OTP-14563' into maint
* ingela/dtls/renegotiate/OTP-14563:
dtls: Compleate DTLS renegotiate implementation
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index b031d3d47b..2dbe08e0a7 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -448,7 +448,7 @@ abbreviated(internal, #change_cipher_spec{type = <<1>>}, #state{connection_states = ConnectionStates0} = State0, Connection) -> ConnectionStates1 = - ssl_record:activate_pending_connection_state(ConnectionStates0, read), + ssl_record:activate_pending_connection_state(ConnectionStates0, read, Connection), {Record, State} = Connection:next_record(State0#state{connection_states = ConnectionStates1}), Connection:next_event(abbreviated, Record, State#state{expecting_finished = true}); @@ -727,7 +727,7 @@ cipher(internal, #next_protocol{selected_protocol = SelectedProtocol}, cipher(internal, #change_cipher_spec{type = <<1>>}, #state{connection_states = ConnectionStates0} = State0, Connection) -> ConnectionStates1 = - ssl_record:activate_pending_connection_state(ConnectionStates0, read), + ssl_record:activate_pending_connection_state(ConnectionStates0, read, Connection), {Record, State} = Connection:next_record(State0#state{connection_states = ConnectionStates1}), Connection:next_event(cipher, Record, State#state{expecting_finished = true}); @@ -1168,8 +1168,9 @@ handle_alert(#alert{level = ?WARNING, description = ?NO_RENEGOTIATION} = Alert, log_alert(SslOpts#ssl_options.log_alert, Role, Connection:protocol_name(), StateName, Alert#alert{role = opposite_role(Role)}), gen_statem:reply(From, {error, renegotiation_rejected}), - {Record, State} = Connection:next_record(State0), + {Record, State1} = Connection:next_record(State0), %% Go back to connection! + State = Connection:reinit_handshake_data(State1#state{renegotiation = undefined}), Connection:next_event(connection, Record, State); %% Gracefully log and ignore all other warning alerts @@ -1721,7 +1722,7 @@ finalize_handshake(State0, StateName, Connection) -> ConnectionStates = ssl_record:activate_pending_connection_state(ConnectionStates0, - write), + write, Connection), State2 = State1#state{connection_states = ConnectionStates}, State = next_protocol(State2, Connection), |