diff options
author | Ingela Anderton Andin <[email protected]> | 2013-03-07 09:18:03 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-03-07 09:18:03 +0100 |
commit | c36caae74e01798445ecc64f77e5f5aede7a2e7d (patch) | |
tree | 2be633a8839ce369f1ea42db181d2f0c8d1cd494 /lib/ssl/src | |
parent | e67eabacca701cd6c7a8cbb8b2ee97c7d16c48a3 (diff) | |
parent | 57a33a31ca0fcb385dd899f4074310d0fbdefda4 (diff) | |
download | otp-c36caae74e01798445ecc64f77e5f5aede7a2e7d.tar.gz otp-c36caae74e01798445ecc64f77e5f5aede7a2e7d.tar.bz2 otp-c36caae74e01798445ecc64f77e5f5aede7a2e7d.zip |
Merge remote branch 'upstream/maint'
Diffstat (limited to 'lib/ssl/src')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 52ddd3c932..4d29ecce7a 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -471,6 +471,13 @@ abbreviated(#finished{verify_data = Data} = Finished, handle_own_alert(Alert, Version, abbreviated, State) end; +%% only allowed to send next_protocol message after change cipher spec +%% & before finished message and it is not allowed during renegotiation +abbreviated(#next_protocol{selected_protocol = SelectedProtocol}, + #state{role = server, expecting_next_protocol_negotiation = true} = State0) -> + {Record, State} = next_record(State0#state{next_protocol = SelectedProtocol}), + next_state(abbreviated, abbreviated, Record, State); + abbreviated(timeout, State) -> { next_state, abbreviated, State, hibernate }; @@ -655,7 +662,7 @@ cipher(#certificate_verify{signature = Signature, hashsign_algorithm = CertHashS handle_own_alert(Alert, Version, cipher, State0) end; -% client must send a next protocol message if we are expecting it +%% client must send a next protocol message if we are expecting it cipher(#finished{}, #state{role = server, expecting_next_protocol_negotiation = true, next_protocol = undefined, negotiated_version = Version} = State0) -> handle_own_alert(?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE), Version, cipher, State0); @@ -680,8 +687,8 @@ cipher(#finished{verify_data = Data} = Finished, handle_own_alert(Alert, Version, cipher, State) end; -% only allowed to send next_protocol message after change cipher spec -% & before finished message and it is not allowed during renegotiation +%% only allowed to send next_protocol message after change cipher spec +%% & before finished message and it is not allowed during renegotiation cipher(#next_protocol{selected_protocol = SelectedProtocol}, #state{role = server, expecting_next_protocol_negotiation = true} = State0) -> {Record, State} = next_record(State0#state{next_protocol = SelectedProtocol}), |