aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-05-02 15:27:54 +0200
committerHans Nilsson <[email protected]>2018-05-02 15:27:54 +0200
commite0e2286660cfb644e04f223090b8e2d78d76845d (patch)
tree71f4515e12bd685774d3877900278324d4ff70be /lib
parent90edf69ba7acbfaa55a709fa115ce8bb782b9dc9 (diff)
downloadotp-e0e2286660cfb644e04f223090b8e2d78d76845d.tar.gz
otp-e0e2286660cfb644e04f223090b8e2d78d76845d.tar.bz2
otp-e0e2286660cfb644e04f223090b8e2d78d76845d.zip
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')
-rw-r--r--lib/ssh/src/ssh_transport.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 61a1a57063..a160309b95 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -1663,13 +1663,13 @@ kex_h(SSH, Curve, Key, Q_c, Q_s, K) ->
kex_h(SSH, Key, Min, NBits, Max, Prime, Gen, E, F, K) ->
KeyBin = public_key:ssh_encode(Key, ssh2_pubkey),
L = if Min==-1; Max==-1 ->
- %% flag from 'ssh_msg_kex_dh_gex_request_old'
- %% It was like this before that message was supported,
- %% why?
+ %% ssh_msg_kex_dh_gex_request_old
<<?Estring(SSH#ssh.c_version), ?Estring(SSH#ssh.s_version),
?Ebinary(SSH#ssh.c_keyinit), ?Ebinary(SSH#ssh.s_keyinit), ?Ebinary(KeyBin),
- ?Empint(E), ?Empint(F), ?Empint(K)>>;
+ ?Euint32(NBits),
+ ?Empint(Prime), ?Empint(Gen), ?Empint(E), ?Empint(F), ?Empint(K)>>;
true ->
+ %% ssh_msg_kex_dh_gex_request
<<?Estring(SSH#ssh.c_version), ?Estring(SSH#ssh.s_version),
?Ebinary(SSH#ssh.c_keyinit), ?Ebinary(SSH#ssh.s_keyinit), ?Ebinary(KeyBin),
?Euint32(Min), ?Euint32(NBits), ?Euint32(Max),