aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-05-08 12:10:38 +0200
committerErlang/OTP <[email protected]>2018-05-08 12:10:38 +0200
commit02457f4625ace93add5c5203cf737a19ece68043 (patch)
tree89e9719aaa3c7af21bc921290519ab377a283f41 /lib
parente42ad012d6aa657425ee6a9117c03607f359269b (diff)
parente0e2286660cfb644e04f223090b8e2d78d76845d (diff)
downloadotp-02457f4625ace93add5c5203cf737a19ece68043.tar.gz
otp-02457f4625ace93add5c5203cf737a19ece68043.tar.bz2
otp-02457f4625ace93add5c5203cf737a19ece68043.zip
Merge branch 'hans/ssh/dh_gex_putty_19/OTP-15064' into maint-19
* hans/ssh/dh_gex_putty_19/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')
-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),