Skip to content
Permalink
Browse files

[JENKINS-44120] Prevent NPE when using DH group 1 or 14 with SHA1 KEX

  • Loading branch information...
mc1arke committed May 17, 2017
1 parent ef5cb14 commit 1d365242a839381a9b205c25f66f0055861c9d5c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/com/trilead/ssh2/transport/KexManager.java
@@ -444,7 +444,7 @@ public synchronized void handleMessage(byte[] msg, int msglen) throws IOExceptio
if (kxs.np.kex_algo.equals("diffie-hellman-group1-sha1")
|| kxs.np.kex_algo.equals("diffie-hellman-group14-sha1"))
{
kxs.dhx = new DhExchange(kxs.dhx.getHashAlgorithm());
kxs.dhx = new DhExchange("SHA1");

if (kxs.np.kex_algo.equals("diffie-hellman-group1-sha1"))
kxs.dhx.init(1, rnd);

0 comments on commit 1d36524

Please sign in to comment.
You can’t perform that action at this time.