Skip to content

Commit

Permalink
[FIXED JENKINS-40362] Upgrads sshd-core to 0.14.0 to pick SSHD-330 (#8)
Browse files Browse the repository at this point in the history
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 c65ba7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -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>
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/jenkinsci/main/modules/sshd/SSHD.java
Expand Up @@ -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;

Expand Down Expand Up @@ -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()));
}
});

Expand Down

0 comments on commit c65ba7f

Please sign in to comment.