diff --git a/WORKSPACE b/WORKSPACE index 5fa28f9e2..75e22a91a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -95,14 +95,14 @@ maven_jar( maven_jar( name = "sshd-osgi", - artifact = "org.apache.sshd:sshd-osgi:2.2.0", - sha1 = "a45d48cb53678e699816e8e054e55fa33f5a4558", + artifact = "org.apache.sshd:sshd-osgi:2.4.0", + sha1 = "fc4551c1eeda35e4671b263297d37d2bca81c4d4", ) maven_jar( name = "sshd-sftp", - artifact = "org.apache.sshd:sshd-sftp:2.2.0", - sha1 = "3d011e00adf38e49bb8711a9dd762fe908a2170c", + artifact = "org.apache.sshd:sshd-sftp:2.4.0", + sha1 = "92e1b7d1e19c715efb4a8871d34145da8f87cdb2", ) maven_jar( diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index e99a2f8a8..27223b2de 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 ac4e9927d..883ff0b8b 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.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.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 SshTestGitServer(@NonNull String testUser, @NonNull Path testKey, configureAuthentication(); - List> subsystems = configureSubsystems(); + List 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 @@ protected Boolean doAuth(Buffer buffer, boolean initial) } } - private List> getAuthFactories() { - List> authentications = new ArrayList<>(); + private List getAuthFactories() { + List 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 boolean validateInitialUser(ServerSession session, * @return A possibly empty collection of subsystems. */ @NonNull - protected List> configureSubsystems() { + protected List configureSubsystems() { // SFTP. server.setFileSystemFactory(new VirtualFileSystemFactory() { diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index c5a8b09eb..faab88ae1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index ed3cd211d..87c22ddd2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index ac0c33de1..5a65e9200 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index 426b61ea1..b9c6541bf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 39d011cc1..6b1774726 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 8a8c0df1c..b93e4638f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index f875b54ea..e63d943a3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index a58e21559..0aca3262b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index d601082ff..7a451cdff 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index a9ef71d17..a564f3c1a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target index ab8e6ec15..56e6be44a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd index 1bfb3752b..9d16027d8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd @@ -1,7 +1,7 @@ target "jgit-4.14-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/staging/2020-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 8cdce9372..cc3925b98 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 5e169d8c6..1105bc19f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index bd287080d..06da15912 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index c87530276..c97b9178b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index cd15ba60f..5d39df8be 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index 91ab59716..e6d20ce48 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index f71923f1d..b54e78c8a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -53,10 +53,10 @@ - - - - + + + + @@ -74,8 +74,8 @@ - - + + @@ -84,7 +84,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index faa6fba18..e75822e2d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200224183213-2020-03.tpd" +include "orbit/I20200319180910.tpd" location "http://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200319180910.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200319180910.tpd new file mode 100644 index 000000000..2e1c85b04 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200319180910.tpd @@ -0,0 +1,66 @@ +target "I20200319180910" with source configurePhase +// see http://download.eclipse.org/tools/orbit/downloads/ + +location "https://download.eclipse.org/tools/orbit/downloads/drops/I20200319180910/repository" { + com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305] + com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305] + javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800] + javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800] + net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + org.apache.ant [1.10.7.v20190926-0324,1.10.7.v20190926-0324] + org.apache.ant.source [1.10.7.v20190926-0324,1.10.7.v20190926-0324] + org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001] + org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001] + org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.httpcomponents.httpclient [4.5.10.v20200114-1512,4.5.10.v20200114-1512] + org.apache.httpcomponents.httpclient.source [4.5.10.v20200114-1512,4.5.10.v20200114-1512] + org.apache.httpcomponents.httpcore [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.httpcomponents.httpcore.source [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.sshd.osgi [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.osgi.source [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.sftp [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.apache.sshd.sftp.source [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.bouncycastle.bcpg [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.bouncycastle.bcpg.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.bouncycastle.bcpkix [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.bouncycastle.bcpkix.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.bouncycastle.bcprov [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.bouncycastle.bcprov.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815] + org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000] + org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250] + org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250] + org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200] + org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200] + org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613] + org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613] +} diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index 25503c26f..0d00e18d1 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -7,14 +7,14 @@ Bundle-Version: 5.8.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.apache.sshd.client.config.hosts;version="[2.2.0,2.3.0)", - org.apache.sshd.common;version="[2.2.0,2.3.0)", - org.apache.sshd.common.auth;version="[2.2.0,2.3.0)", - org.apache.sshd.common.config.keys;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.net;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.security;version="[2.2.0,2.3.0)", +Import-Package: org.apache.sshd.client.config.hosts;version="[2.4.0,2.5.0)", + org.apache.sshd.common;version="[2.4.0,2.5.0)", + org.apache.sshd.common.auth;version="[2.4.0,2.5.0)", + org.apache.sshd.common.config.keys;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.net;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.security;version="[2.4.0,2.5.0)", org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.8.0,5.9.0)", org.eclipse.jgit.junit;version="[5.8.0,5.9.0)", diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF index 2195e06d1..2f0c12d38 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF @@ -33,48 +33,48 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.8.0";x-inter org.apache.sshd.client.session, org.apache.sshd.client.keyverifier" Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)", - org.apache.sshd.agent;version="[2.2.0,2.3.0)", - org.apache.sshd.client;version="[2.2.0,2.3.0)", - org.apache.sshd.client.auth;version="[2.2.0,2.3.0)", - org.apache.sshd.client.auth.keyboard;version="[2.2.0,2.3.0)", - org.apache.sshd.client.auth.password;version="[2.2.0,2.3.0)", - org.apache.sshd.client.auth.pubkey;version="[2.2.0,2.3.0)", - org.apache.sshd.client.channel;version="[2.2.0,2.3.0)", - org.apache.sshd.client.config.hosts;version="[2.2.0,2.3.0)", - org.apache.sshd.client.config.keys;version="[2.2.0,2.3.0)", - org.apache.sshd.client.future;version="[2.2.0,2.3.0)", - org.apache.sshd.client.keyverifier;version="[2.2.0,2.3.0)", - org.apache.sshd.client.session;version="[2.2.0,2.3.0)", - org.apache.sshd.client.subsystem.sftp;version="[2.2.0,2.3.0)", - org.apache.sshd.common;version="[2.2.0,2.3.0)", - org.apache.sshd.common.auth;version="[2.2.0,2.3.0)", - org.apache.sshd.common.channel;version="[2.2.0,2.3.0)", - org.apache.sshd.common.compression;version="[2.2.0,2.3.0)", - org.apache.sshd.common.config.keys;version="[2.2.0,2.3.0)", - org.apache.sshd.common.config.keys.loader;version="[2.2.0,2.3.0)", - org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.2.0,2.3.0)", - org.apache.sshd.common.digest;version="[2.2.0,2.3.0)", - org.apache.sshd.common.forward;version="[2.2.0,2.3.0)", - org.apache.sshd.common.future;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.mac;version="[2.2.0,2.3.0)", - org.apache.sshd.common.random;version="[2.2.0,2.3.0)", - org.apache.sshd.common.session;version="[2.2.0,2.3.0)", - org.apache.sshd.common.session.helpers;version="[2.2.0,2.3.0)", - org.apache.sshd.common.signature;version="[2.2.0,2.3.0)", - org.apache.sshd.common.subsystem.sftp;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util;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.closeable;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.io;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.io.resource;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.net;version="[2.2.0,2.3.0)", - org.apache.sshd.common.util.security;version="[2.2.0,2.3.0)", - org.apache.sshd.server.auth;version="[2.2.0,2.3.0)", + org.apache.sshd.agent;version="[2.4.0,2.5.0)", + org.apache.sshd.client;version="[2.4.0,2.5.0)", + org.apache.sshd.client.auth;version="[2.4.0,2.5.0)", + org.apache.sshd.client.auth.keyboard;version="[2.4.0,2.5.0)", + org.apache.sshd.client.auth.password;version="[2.4.0,2.5.0)", + org.apache.sshd.client.auth.pubkey;version="[2.4.0,2.5.0)", + org.apache.sshd.client.channel;version="[2.4.0,2.5.0)", + org.apache.sshd.client.config.hosts;version="[2.4.0,2.5.0)", + org.apache.sshd.client.config.keys;version="[2.4.0,2.5.0)", + org.apache.sshd.client.future;version="[2.4.0,2.5.0)", + org.apache.sshd.client.keyverifier;version="[2.4.0,2.5.0)", + org.apache.sshd.client.session;version="[2.4.0,2.5.0)", + org.apache.sshd.client.subsystem.sftp;version="[2.4.0,2.5.0)", + org.apache.sshd.common;version="[2.4.0,2.5.0)", + org.apache.sshd.common.auth;version="[2.4.0,2.5.0)", + org.apache.sshd.common.channel;version="[2.4.0,2.5.0)", + org.apache.sshd.common.compression;version="[2.4.0,2.5.0)", + org.apache.sshd.common.config.keys;version="[2.4.0,2.5.0)", + org.apache.sshd.common.config.keys.loader;version="[2.4.0,2.5.0)", + org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.4.0,2.5.0)", + org.apache.sshd.common.digest;version="[2.4.0,2.5.0)", + org.apache.sshd.common.forward;version="[2.4.0,2.5.0)", + org.apache.sshd.common.future;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.mac;version="[2.4.0,2.5.0)", + org.apache.sshd.common.random;version="[2.4.0,2.5.0)", + org.apache.sshd.common.session;version="[2.4.0,2.5.0)", + org.apache.sshd.common.session.helpers;version="[2.4.0,2.5.0)", + org.apache.sshd.common.signature;version="[2.4.0,2.5.0)", + org.apache.sshd.common.subsystem.sftp;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util;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.closeable;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.io;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.io.resource;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.net;version="[2.4.0,2.5.0)", + org.apache.sshd.common.util.security;version="[2.4.0,2.5.0)", + org.apache.sshd.server.auth;version="[2.4.0,2.5.0)", org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)", org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", org.eclipse.jgit.fnmatch;version="[5.8.0,5.9.0)", diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/GssApiWithMicAuthFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/GssApiWithMicAuthFactory.java index 2d5991647..e4b3716fc 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/GssApiWithMicAuthFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/GssApiWithMicAuthFactory.java @@ -9,8 +9,11 @@ */ package org.eclipse.jgit.internal.transport.sshd; +import java.io.IOException; + import org.apache.sshd.client.auth.AbstractUserAuthFactory; import org.apache.sshd.client.auth.UserAuth; +import org.apache.sshd.client.session.ClientSession; /** * Factory to create {@link GssApiWithMicAuthentication} handlers. @@ -28,7 +31,8 @@ private GssApiWithMicAuthFactory() { } @Override - public UserAuth create() { + public UserAuth createUserAuth(ClientSession session) + throws IOException { return new GssApiWithMicAuthentication(); } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 0bf203f45..420a1d16e 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -12,6 +12,7 @@ import static java.text.MessageFormat.format; import java.io.IOException; +import java.io.StreamCorruptedException; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; @@ -309,18 +310,6 @@ private List filteredList(Set known, String values) { return newNames; } - @Override - protected boolean readIdentification(Buffer buffer) throws IOException { - // Propagate a failure from doReadIdentification. - // TODO: remove for sshd > 2.3.0; its doReadIdentification throws - // StreamCorruptedException instead of IllegalStateException. - try { - return super.readIdentification(buffer); - } catch (IllegalStateException e) { - throw new IOException(e.getLocalizedMessage(), e); - } - } - /** * Reads the RFC 4253, section 4.2 protocol version identification. The * Apache MINA sshd default implementation checks for NUL bytes also in any @@ -336,12 +325,14 @@ protected boolean readIdentification(Buffer buffer) throws IOException { * @return the lines read, with the server identification line last, or * {@code null} if no identification line was found and more bytes * are needed - * + * @throws StreamCorruptedException + * if the identification is malformed * @see RFC 4253, * section 4.2 */ @Override - protected List doReadIdentification(Buffer buffer, boolean server) { + protected List doReadIdentification(Buffer buffer, boolean server) + throws StreamCorruptedException { if (server) { // Should never happen. No translation; internal bug. throw new IllegalStateException( @@ -379,12 +370,12 @@ protected List doReadIdentification(Buffer buffer, boolean server) { ident.add(line); if (line.startsWith("SSH-")) { //$NON-NLS-1$ if (hasNul) { - throw new IllegalStateException( + throw new StreamCorruptedException( format(SshdText.get().serverIdWithNul, escapeControls(line))); } if (line.length() + eol > 255) { - throw new IllegalStateException( + throw new StreamCorruptedException( format(SshdText.get().serverIdTooLong, escapeControls(line))); } @@ -406,7 +397,7 @@ protected List doReadIdentification(Buffer buffer, boolean server) { log.debug(msg); log.debug(buffer.toHex()); } - throw new IllegalStateException(msg); + throw new StreamCorruptedException(msg); } } // Need more data diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java index 0326368fc..715f3b8ed 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java @@ -9,9 +9,12 @@ */ package org.eclipse.jgit.internal.transport.sshd; +import java.io.IOException; + import org.apache.sshd.client.auth.AbstractUserAuthFactory; -import org.apache.sshd.client.auth.UserAuth; +import org.apache.sshd.client.auth.password.UserAuthPassword; import org.apache.sshd.client.auth.password.UserAuthPasswordFactory; +import org.apache.sshd.client.session.ClientSession; /** * A customized {@link UserAuthPasswordFactory} that creates instance of @@ -27,7 +30,8 @@ private JGitPasswordAuthFactory() { } @Override - public UserAuth create() { + public UserAuthPassword createUserAuth(ClientSession session) + throws IOException { return new JGitPasswordAuthentication(); } } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index 54157448a..4c1b49b67 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -29,11 +29,10 @@ import org.apache.sshd.client.ClientBuilder; import org.apache.sshd.client.SshClient; -import org.apache.sshd.client.auth.UserAuth; +import org.apache.sshd.client.auth.UserAuthFactory; import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory; import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; -import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.compression.BuiltinCompressions; import org.apache.sshd.common.config.keys.FilePasswordProvider; import org.apache.sshd.common.config.keys.loader.openssh.kdf.BCryptKdfOptions; @@ -505,7 +504,7 @@ private FilePasswordProvider createFilePasswordProvider( * @return the non-empty list of factories. */ @NonNull - private List> getUserAuthFactories() { + private List getUserAuthFactories() { // About the order of password and keyboard-interactive, see upstream // bug https://issues.apache.org/jira/projects/SSHD/issues/SSHD-866 . // Password auth doesn't have this problem. diff --git a/pom.xml b/pom.xml index 38517ff05..6764644f3 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ ${project.build.directory}/META-INF/MANIFEST.MF 5.7.0.202003110725-r - 2.2.0 + 2.4.0 0.1.55 1.1.1 1.1.7