Skip to content
Permalink
Browse files

Merge pull request #24 from mc1arke/jenkins-44120-fix-npe

[JENKINS-44120] Prevent NPE when using DH group 1 or 14 with SHA1 KEX
  • Loading branch information...
mc1arke committed May 17, 2017
2 parents ef5cb14 + 1d36524 commit 8ddd97a72e62f62e9eb04c873610893be1a8b053
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 8ddd97a

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