diff options
author | Ingela Anderton Andin <[email protected]> | 2016-07-08 16:44:14 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-09-05 14:37:26 +0200 |
commit | 7ef8905652aa9dcf78e015261c6423b664a2ca1b (patch) | |
tree | b95db9dfebf618f5844b71679e2339a4e7614908 /lib/ssl/src/ssl_connection.erl | |
parent | 753a85c822a8d6c2d7b039f142afc7df202c9f18 (diff) | |
download | otp-7ef8905652aa9dcf78e015261c6423b664a2ca1b.tar.gz otp-7ef8905652aa9dcf78e015261c6423b664a2ca1b.tar.bz2 otp-7ef8905652aa9dcf78e015261c6423b664a2ca1b.zip |
ssl, dtls: Disable V2 compatibility clause from ssl_handshake:update_handshake_history
This proably a much bigger problem for DTLS than TLS, but should be
disabled for both unless explicitly configured for TLS.
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 066ec8af52..66e47cc504 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -803,12 +803,14 @@ handle_common_event(internal, {handshake, {#hello_request{}, _}}, StateName, #st when StateName =/= connection -> {keep_state_and_data}; handle_common_event(internal, {handshake, {Handshake, Raw}}, StateName, - #state{tls_handshake_history = Hs0} = State0, Connection) -> + #state{tls_handshake_history = Hs0, + ssl_options = #ssl_options{v2_hello_compatible = V2HComp}} = State0, + Connection) -> %% This function handles client SNI hello extension when Handshake is %% a client_hello, which needs to be determined by the connection callback. %% In other cases this is a noop State = Connection:handle_sni_extension(Handshake, State0), - HsHist = ssl_handshake:update_handshake_history(Hs0, Raw), + HsHist = ssl_handshake:update_handshake_history(Hs0, Raw, V2HComp), {next_state, StateName, State#state{tls_handshake_history = HsHist}, [{next_event, internal, Handshake}]}; handle_common_event(internal, {tls_record, TLSRecord}, StateName, State, Connection) -> |