aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_transport.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-05-07 12:49:45 +0200
committerErlang/OTP <[email protected]>2018-05-07 12:49:45 +0200
commitdbbe36f71e558f157ba54d9c6254be2879b33361 (patch)
treee72311cbd4a77f90401824d66961ce8f9ccf92e8 /lib/ssh/src/ssh_transport.erl
parentcc0747c32f23b51cd55a8a3b33517eaa7a2b3f9d (diff)
parent169e26ba4facb637831aaaa02d878b988a090ff0 (diff)
downloadotp-dbbe36f71e558f157ba54d9c6254be2879b33361.tar.gz
otp-dbbe36f71e558f157ba54d9c6254be2879b33361.tar.bz2
otp-dbbe36f71e558f157ba54d9c6254be2879b33361.zip
Merge branch 'hans/ssh/dh_gex_putty/OTP-15064' into maint-20
* hans/ssh/dh_gex_putty/OTP-15064: ssh: Fix DH group exchange server bug for PuTTY and others following draft-draft-00 from 2001 and not the rfc4419
Diffstat (limited to 'lib/ssh/src/ssh_transport.erl')
-rw-r--r--lib/ssh/src/ssh_transport.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 975053d301..edc927e807 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -1839,9 +1839,10 @@ kex_alg_dependent({E, F, K}) ->
%% diffie-hellman and ec diffie-hellman (with E = Q_c, F = Q_s)
<<?Empint(E), ?Empint(F), ?Empint(K)>>;
-kex_alg_dependent({-1, _, -1, _, _, E, F, K}) ->
+kex_alg_dependent({-1, NBits, -1, Prime, Gen, E, F, K}) ->
%% ssh_msg_kex_dh_gex_request_old
- <<?Empint(E), ?Empint(F), ?Empint(K)>>;
+ <<?Euint32(NBits),
+ ?Empint(Prime), ?Empint(Gen), ?Empint(E), ?Empint(F), ?Empint(K)>>;
kex_alg_dependent({Min, NBits, Max, Prime, Gen, E, F, K}) ->
%% diffie-hellman group exchange