diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-03-12 19:38:57 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-03-22 00:37:05 +0100 |
commit | fd3778b935c1de9fd3ae7068d71c46974741dcce (patch) | |
tree | fa4d64170f437b61a6146e5c7a60db50901b5bb9 /org.eclipse.jgit.junit.ssh | |
parent | 7d3b6308fc2e44e8ae462d56fb2f1aa61012fb35 (diff) | |
download | jgit-fd3778b935c1de9fd3ae7068d71c46974741dcce.tar.gz jgit-fd3778b935c1de9fd3ae7068d71c46974741dcce.zip |
Update to org.apache.sshd 2.4.0
Change target platforms to Orbit I20200319180910 and regenerate them.
Change package imports to [2.4.0,2.5.0); adapt code to upstream API
changes.
Maven build: update version in root pom.
Bazel build: update version & hash in WORKSPACE file.
Proxy functionality verified manually using 3proxy (HTTP & SOCKS,
with basic authentication) and ssh -vvv -D7020 localhost (SOCKS, no
authentication).
Bug: 561078
Change-Id: I582f6b98055b013c006f2c749890fe6db801cbaa
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.junit.ssh')
-rw-r--r-- | org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF | 44 | ||||
-rw-r--r-- | org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java | 17 |
2 files changed, 31 insertions, 30 deletions
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index e99a2f8a8a..27223b2de8 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF @@ -8,28 +8,28 @@ Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.apache.sshd.common;version="[2.2.0,2.3.0)", - org.apache.sshd.common.config.keys;version="[2.2.0,2.3.0)", - org.apache.sshd.common.file.virtualfs;version="[2.2.0,2.3.0)", - org.apache.sshd.common.helpers;version="[2.2.0,2.3.0)", - org.apache.sshd.common.io;version="[2.2.0,2.3.0)", - org.apache.sshd.common.kex;version="[2.2.0,2.3.0)", - org.apache.sshd.common.keyprovider;version="[2.2.0,2.3.0)", - org.apache.sshd.common.session;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.buffer;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.logging;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.security;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.threads;version="[2.2.0,2.3.0)", - org.apache.sshd.server;version="[2.2.0,2.3.0)", - org.apache.sshd.server.auth;version="[2.2.0,2.3.0)", - org.apache.sshd.server.auth.gss;version="[2.2.0,2.3.0)", - org.apache.sshd.server.auth.keyboard;version="[2.2.0,2.3.0)", - org.apache.sshd.server.auth.password;version="[2.2.0,2.3.0)", - org.apache.sshd.server.command;version="[2.2.0,2.3.0)", - org.apache.sshd.server.session;version="[2.2.0,2.3.0)", - org.apache.sshd.server.shell;version="[2.2.0,2.3.0)", - org.apache.sshd.server.subsystem;version="[2.2.0,2.3.0)", - org.apache.sshd.server.subsystem.sftp;version="[2.2.0,2.3.0)", +Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)", + org.apache.sshd.common.config.keys;version="[2.4.0,2.5.0)", + org.apache.sshd.common.file.virtualfs;version="[2.4.0,2.5.0)", + org.apache.sshd.common.helpers;version="[2.4.0,2.5.0)", + org.apache.sshd.common.io;version="[2.4.0,2.5.0)", + org.apache.sshd.common.kex;version="[2.4.0,2.5.0)", + org.apache.sshd.common.keyprovider;version="[2.4.0,2.5.0)", + org.apache.sshd.common.session;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.buffer;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.logging;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.security;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.threads;version="[2.4.0,2.5.0)", + org.apache.sshd.server;version="[2.4.0,2.5.0)", + org.apache.sshd.server.auth;version="[2.4.0,2.5.0)", + org.apache.sshd.server.auth.gss;version="[2.4.0,2.5.0)", + org.apache.sshd.server.auth.keyboard;version="[2.4.0,2.5.0)", + org.apache.sshd.server.auth.password;version="[2.4.0,2.5.0)", + org.apache.sshd.server.command;version="[2.4.0,2.5.0)", + org.apache.sshd.server.session;version="[2.4.0,2.5.0)", + org.apache.sshd.server.shell;version="[2.4.0,2.5.0)", + org.apache.sshd.server.subsystem;version="[2.4.0,2.5.0)", + org.apache.sshd.server.subsystem.sftp;version="[2.4.0,2.5.0)", org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)", org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java index ac4e9927d9..883ff0b8b5 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java @@ -23,7 +23,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.NamedResource; import org.apache.sshd.common.PropertyResolverUtils; import org.apache.sshd.common.SshConstants; @@ -40,14 +39,15 @@ import org.apache.sshd.server.ServerAuthenticationManager; import org.apache.sshd.server.ServerFactoryManager; import org.apache.sshd.server.SshServer; import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.UserAuthFactory; import org.apache.sshd.server.auth.gss.GSSAuthenticator; import org.apache.sshd.server.auth.gss.UserAuthGSS; import org.apache.sshd.server.auth.gss.UserAuthGSSFactory; import org.apache.sshd.server.auth.keyboard.DefaultKeyboardInteractiveAuthenticator; import org.apache.sshd.server.command.AbstractCommandSupport; -import org.apache.sshd.server.command.Command; import org.apache.sshd.server.session.ServerSession; import org.apache.sshd.server.shell.UnknownCommand; +import org.apache.sshd.server.subsystem.SubsystemFactory; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.lib.Repository; @@ -117,14 +117,14 @@ public class SshTestGitServer { configureAuthentication(); - List<NamedFactory<Command>> subsystems = configureSubsystems(); + List<SubsystemFactory> subsystems = configureSubsystems(); if (!subsystems.isEmpty()) { server.setSubsystemFactories(subsystems); } configureShell(); - server.setCommandFactory(command -> { + server.setCommandFactory((channel, command) -> { if (command.startsWith(RemoteConfig.DEFAULT_UPLOAD_PACK)) { return new GitUploadPackCommand(command, executorService); } else if (command.startsWith(RemoteConfig.DEFAULT_RECEIVE_PACK)) { @@ -155,11 +155,12 @@ public class SshTestGitServer { } } - private List<NamedFactory<UserAuth>> getAuthFactories() { - List<NamedFactory<UserAuth>> authentications = new ArrayList<>(); + private List<UserAuthFactory> getAuthFactories() { + List<UserAuthFactory> authentications = new ArrayList<>(); authentications.add(new UserAuthGSSFactory() { @Override - public UserAuth create() { + public UserAuth createUserAuth(ServerSession session) + throws IOException { return new FakeUserAuthGSS(); } }); @@ -208,7 +209,7 @@ public class SshTestGitServer { * @return A possibly empty collection of subsystems. */ @NonNull - protected List<NamedFactory<Command>> configureSubsystems() { + protected List<SubsystemFactory> configureSubsystems() { // SFTP. server.setFileSystemFactory(new VirtualFileSystemFactory() { |