summaryrefslogtreecommitdiffstats
path: root/java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java')
-rw-r--r--java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java b/java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java
index d8e968a6f6..de91b681b9 100644
--- a/java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java
+++ b/java/com/google/gerrit/sshd/SshSessionFactoryInitializer.java
@@ -14,29 +14,18 @@
package com.google.gerrit.sshd;
-import static com.google.gerrit.server.config.SshClientImplementation.APACHE;
-
-import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.ssh.jsch.JschConfigSessionFactory;
import org.eclipse.jgit.transport.sshd.DefaultProxyDataFactory;
import org.eclipse.jgit.transport.sshd.JGitKeyCache;
import org.eclipse.jgit.transport.sshd.SshdSessionFactory;
import org.eclipse.jgit.util.FS;
public class SshSessionFactoryInitializer {
- public static void init(Config config) {
- switch (config.getEnum("ssh", null, "clientImplementation", APACHE)) {
- case APACHE:
- SshdSessionFactory factory =
- new SshdSessionFactory(new JGitKeyCache(), new DefaultProxyDataFactory());
- factory.setHomeDirectory(FS.DETECTED.userHome());
- SshSessionFactory.setInstance(factory);
- break;
-
- case JSCH:
- SshSessionFactory.setInstance(new JschConfigSessionFactory());
- }
+ public static void init() {
+ SshdSessionFactory factory =
+ new SshdSessionFactory(new JGitKeyCache(), new DefaultProxyDataFactory());
+ factory.setHomeDirectory(FS.DETECTED.userHome());
+ SshSessionFactory.setInstance(factory);
}
private SshSessionFactoryInitializer() {}