diff options
author | Hans Nilsson <[email protected]> | 2017-01-26 22:48:13 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-01-30 10:13:58 +0100 |
commit | 80a162cdf59f6a3826fba0cc0d3b861451a6b102 (patch) | |
tree | 64de1bb4302a4cc349eb4925f88764d69737606f /lib/ssh/src/ssh_connection_handler.erl | |
parent | 6468551301f906ce4199ef69b677147d88d64242 (diff) | |
download | otp-80a162cdf59f6a3826fba0cc0d3b861451a6b102.tar.gz otp-80a162cdf59f6a3826fba0cc0d3b861451a6b102.tar.bz2 otp-80a162cdf59f6a3826fba0cc0d3b861451a6b102.zip |
ssh: optimize kex dh_gex using new crypto functionality
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 8718e92fa2..4496c657c3 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -609,13 +609,15 @@ handle_event(_, #ssh_msg_kexdh_reply{} = Msg, {key_exchange,client,ReNeg}, D) -> %%%---- diffie-hellman group exchange handle_event(_, #ssh_msg_kex_dh_gex_request{} = Msg, {key_exchange,server,ReNeg}, D) -> - {ok, GexGroup, Ssh} = ssh_transport:handle_kex_dh_gex_request(Msg, D#data.ssh_params), + {ok, GexGroup, Ssh1} = ssh_transport:handle_kex_dh_gex_request(Msg, D#data.ssh_params), send_bytes(GexGroup, D), + Ssh = ssh_transport:parallell_gen_key(Ssh1), {next_state, {key_exchange_dh_gex_init,server,ReNeg}, D#data{ssh_params=Ssh}}; handle_event(_, #ssh_msg_kex_dh_gex_request_old{} = Msg, {key_exchange,server,ReNeg}, D) -> - {ok, GexGroup, Ssh} = ssh_transport:handle_kex_dh_gex_request(Msg, D#data.ssh_params), + {ok, GexGroup, Ssh1} = ssh_transport:handle_kex_dh_gex_request(Msg, D#data.ssh_params), send_bytes(GexGroup, D), + Ssh = ssh_transport:parallell_gen_key(Ssh1), {next_state, {key_exchange_dh_gex_init,server,ReNeg}, D#data{ssh_params=Ssh}}; handle_event(_, #ssh_msg_kex_dh_gex_group{} = Msg, {key_exchange,client,ReNeg}, D) -> |