Bump mina-sshd to 2.5.1 54/91054/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Jul 2020 16:46:41 +0000 (18:46 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 9 Jul 2020 19:18:32 +0000 (19:18 +0000)
https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.0.md
https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.1.md

Change-Id: I95b25909fad428a3ba61472cedc7d98c3ebe1532
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c2e07b76734c34a2fe88262530b4ac4a387b8ee7)

netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/NetconfSshClient.java
netconf/shaded-sshd-jar/pom.xml

index 7b5308a36f3d544cc6f15941237f81a765c7d921..d5d0d97aa955636191257b0ef4e8e792fbb1a9ae 100644 (file)
@@ -10,8 +10,6 @@ package org.opendaylight.netconf.nettyutil.handler.ssh.client;
 import com.google.common.annotations.Beta;
 import org.opendaylight.netconf.shaded.sshd.client.SshClient;
 import org.opendaylight.netconf.shaded.sshd.common.Factory;
-import org.opendaylight.netconf.shaded.sshd.common.forward.PortForwardingEventListener;
-import org.opendaylight.netconf.shaded.sshd.common.util.net.SshdSocketAddress;
 
 /**
  * An extension to {@link SshClient} which uses {@link NetconfSessionFactory} to create sessions (leading towards
@@ -21,22 +19,6 @@ import org.opendaylight.netconf.shaded.sshd.common.util.net.SshdSocketAddress;
 public class NetconfSshClient extends SshClient {
     public static final Factory<SshClient> DEFAULT_NETCONF_SSH_CLIENT_FACTORY = NetconfSshClient::new;
 
-    /*
-     * This is a workaround for sshd-core's instantiation of Proxies. AbstractFactoryManager (which is our superclass)
-     * is calling Proxy.newProxyInstance() with getClass().getClassLoader(), i.e. our class loader.
-     *
-     * Since we are not using PortForwardingEventListener, our classloader does not see it (because we do not import
-     * that package), which leads to an instantiation failure.
-     *
-     * Having these dumb fields alleviates the problem, as it forces the packages to be imported by our bundle.
-     *
-     * FIXME: Remove this once we have an SSHD version with  https://issues.apache.org/jira/browse/SSHD-975 fixed
-     */
-    static final class Sshd975Workarounds {
-        static final PortForwardingEventListener PFEL = null;
-        static final SshdSocketAddress SSA = null;
-    }
-
     @Override
     protected NetconfSessionFactory createSessionFactory() {
         return new NetconfSessionFactory(this);
index 5c6fc2dfd9cdbeaa9d86e231f93111428f1386ce..5530cd12ea16e6ac9a0c7944f80c4db4899d38e9 100644 (file)
         <dependency>
             <groupId>org.apache.sshd</groupId>
             <artifactId>sshd-osgi</artifactId>
-            <version>2.4.0</version>
+            <version>2.5.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sshd</groupId>
             <artifactId>sshd-netty</artifactId>
-            <version>2.4.0</version>
+            <version>2.5.1</version>
         </dependency>
         <dependency>
             <groupId>net.i2p.crypto</groupId>