aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.ssh
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.junit.ssh')
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF44
-rw-r--r--org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java17
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 a4761afe90..28f3513b8d 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="[6.0.0,6.1.0)",
org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
org.eclipse.jgit.transport;version="[6.0.0,6.1.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() {