Skip to content
Permalink
Browse files
[FIXED JENKINS-40362] Upgrads sshd-core to 0.14.0 to pick SSHD-330 (#8)
This solves a really bad issue where 1 handshake
in 256 fails randomly [1].

Note: The issue was easily reproducable, and after this
dependency upgrade the handshake did not fail in over
15K test connections.

[1] https://issues.apache.org/jira/browse/SSHD-330
  • Loading branch information
GLundh authored and oleg-nenashev committed Dec 11, 2016
1 parent ca80dee commit c65ba7f845f7e37fe0ecc58731311095fd92bdf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
@@ -52,7 +52,7 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>0.8.0</version>
<version>0.14.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.security.KeyPair;
import java.util.Arrays;
import java.util.Collections;
import java.util.logging.Level;
import java.util.logging.Logger;

@@ -94,10 +95,8 @@ public synchronized void start() throws IOException, InterruptedException {

sshd.setKeyPairProvider(new AbstractKeyPairProvider() {
@Override
protected KeyPair[] loadKeys() {
return new KeyPair[] {
new KeyPair(identity.getPublic(),identity.getPrivate())
};
public Iterable<KeyPair> loadKeys() {
return Collections.singletonList(new KeyPair(identity.getPublic(),identity.getPrivate()));
}
});

0 comments on commit c65ba7f

Please sign in to comment.