aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-12-03 02:32:05 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2018-12-03 02:32:16 +0100
commit13afcf75fe7367bf22254d1341a14254efb3c02c (patch)
tree3d6af27d4c6bd41c6183980367aa1767dec394c4
parent8ed9e489e07c29569f8a94402b9b9cbf8fc4cf57 (diff)
parentf4d7c911fd28e89ed9ef9e63b7313d225cb6c740 (diff)
downloadjgit-13afcf75fe7367bf22254d1341a14254efb3c02c.tar.gz
jgit-13afcf75fe7367bf22254d1341a14254efb3c02c.zip
Merge branch 'stable-5.2'
* stable-5.2: Format lib/BUILD with buildifier Update Orbit to S20181128170323 for 2018-12 RC1 Include id_ed25519 in the known default identity files Apache MINA sshd client: enable support for ed25519 keys Prepare 5.2.0-SNAPSHOT builds Set git environment variables for hooks JGit v5.2.0.201811281532-m3 Change-Id: If96adcbf35ccf8d9f4da0f5d97491f502f5a72a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--WORKSPACE6
-rw-r--r--lib/BUILD11
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml7
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20181128170323-2018-12.tpd (renamed from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20181128011035-2018-12.tpd)4
-rw-r--r--org.eclipse.jgit.ssh.apache.test/BUILD1
-rw-r--r--org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java21
-rw-r--r--org.eclipse.jgit.ssh.apache/BUILD1
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.jgit.ssh.apache/pom.xml7
-rw-r--r--org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java7
26 files changed, 92 insertions, 26 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 66bdd67cb2..0eabeccbc5 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -23,6 +23,12 @@ load(
)
maven_jar(
+ name = "eddsa",
+ artifact = "net.i2p.crypto:eddsa:0.3.0",
+ sha1 = "1901c8d4d8bffb7d79027686cfb91e704217c3e1",
+)
+
+maven_jar(
name = "jsch",
artifact = "com.jcraft:jsch:0.1.54",
sha1 = "da3584329a263616e277e15462b387addd1b208d",
diff --git a/lib/BUILD b/lib/BUILD
index 4803466eca..0c5c224262 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -28,6 +28,15 @@ java_library(
)
java_library(
+ name = "eddsa",
+ visibility = [
+ "//org.eclipse.jgit.ssh.apache:__pkg__",
+ "//org.eclipse.jgit.ssh.apache.test:__pkg__",
+ ],
+ exports = ["@eddsa//jar"],
+)
+
+java_library(
name = "gson",
visibility = [
"//org.eclipse.jgit.lfs:__pkg__",
@@ -163,9 +172,9 @@ java_library(
testonly = 1,
visibility = ["//visibility:public"],
exports = [
- "@mockito//jar",
"@byte_buddy//jar",
"@byte_buddy_agent//jar",
+ "@mockito//jar",
"@objenesis//jar",
],
)
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
index b80ff3799c..2f15de18a4 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
@@ -47,4 +47,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="net.i2p.crypto.eddsa"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target
index dfc5438c2b..59b66b0403 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.9-staging" sequenceNumber="1543418361">
+<target name="jgit-4.9-staging" sequenceNumber="1543791695">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd
index 7fbc58a7f8..0693be4ac2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd
@@ -1,7 +1,7 @@
target "jgit-4.9-staging" with source configurePhase
include "projects/jetty-9.4.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.tpd"
location "http://download.eclipse.org/staging/2018-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target
index 6b1b08f7b9..8705ad0d95 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.5" sequenceNumber="1543418280">
+<target name="jgit-4.5" sequenceNumber="1543791667">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd
index be40b39560..44c5f0a44e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd
@@ -1,7 +1,7 @@
target "jgit-4.5" with source configurePhase
include "projects/jetty-9.4.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.tpd"
location "http://download.eclipse.org/releases/mars/" {
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 ffc0d3781f..94f1ceb005 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 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.6" sequenceNumber="1543418269">
+<target name="jgit-4.6" sequenceNumber="1543791642">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
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 559822ab0c..d286e35ccd 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.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.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 92b6b5f05d..505ea25d4b 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 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.7" sequenceNumber="1543418251">
+<target name="jgit-4.7" sequenceNumber="1543791619">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
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 ecce9c405f..173051fde9 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.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.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 90058881d4..d162a99eef 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 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.8" sequenceNumber="1543418240">
+<target name="jgit-4.8" sequenceNumber="1543791605">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
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 cdac3c53e8..a9a21a248d 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.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.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 da23d0459a..4742847478 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 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.9" sequenceNumber="1543418232">
+<target name="jgit-4.9" sequenceNumber="1543791591">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository"/>
+ <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
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 c51619cf30..3deaacf3d7 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.11.tpd"
-include "orbit/I20181128011035-2018-12.tpd"
+include "orbit/S20181128170323-2018-12.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/I20181128011035-2018-12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20181128170323-2018-12.tpd
index 8347d12337..fc89c2783e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20181128011035-2018-12.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20181128170323-2018-12.tpd
@@ -1,7 +1,7 @@
-target "I20181128011035-2018-12" with source configurePhase
+target "S20181128170323-2018-12" with source configurePhase
// see http://download.eclipse.org/tools/orbit/downloads/
-location "http://download.eclipse.org/tools/orbit/downloads/drops/I20181128011035/repository" {
+location "http://download.eclipse.org/tools/orbit/downloads/drops/S20181128170323/repository" {
org.apache.ant [1.10.5.v20180808-0324,1.10.5.v20180808-0324]
org.apache.ant.source [1.10.5.v20180808-0324,1.10.5.v20180808-0324]
org.apache.commons.codec [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
diff --git a/org.eclipse.jgit.ssh.apache.test/BUILD b/org.eclipse.jgit.ssh.apache.test/BUILD
index 3742aff06d..a13cf0b30f 100644
--- a/org.eclipse.jgit.ssh.apache.test/BUILD
+++ b/org.eclipse.jgit.ssh.apache.test/BUILD
@@ -8,6 +8,7 @@ junit_tests(
srcs = glob(["tst/**/*.java"]),
tags = ["sshd"],
deps = [
+ "//lib:eddsa",
"//lib:junit",
"//lib:sshd-core",
"//lib:sshd-sftp",
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 38dc190679..b87ef7cffa 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -8,6 +8,7 @@ Bundle-Vendor: %Provider-Name
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.2.0,5.3.0)",
org.eclipse.jgit.junit;version="[5.2.0,5.3.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.2.0,5.3.0)",
org.eclipse.jgit.lib;version="[5.2.0,5.3.0)",
org.eclipse.jgit.transport;version="[5.2.0,5.3.0)",
org.eclipse.jgit.transport.ssh;version="[5.2.0,5.3.0)",
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
index 69a9165aa7..ee58083a5a 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
@@ -53,6 +53,7 @@ import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.ssh.SshTestBase;
import org.eclipse.jgit.transport.sshd.SshdSessionFactory;
import org.eclipse.jgit.util.FS;
+import org.junit.Test;
import org.junit.experimental.theories.Theories;
import org.junit.runner.RunWith;
@@ -81,4 +82,24 @@ public class ApacheSshTest extends SshTestBase {
}
}
+ // Using an ed25519 (unencrypted) user key is tested in the super class in
+ // testSshKeys(). sshd 2.0.0 cannot yet read encrypted ed25519 keys.
+
+ @Test
+ public void testEd25519HostKey() throws Exception {
+ File newHostKey = new File(getTemporaryDirectory(), "newhostkey");
+ copyTestResource("id_ed25519", newHostKey);
+ server.addHostKey(newHostKey.toPath(), true);
+ File newHostKeyPub = new File(getTemporaryDirectory(),
+ "newhostkey.pub");
+ copyTestResource("id_ed25519.pub", newHostKeyPub);
+ createKnownHostsFile(knownHosts, "localhost", testPort, newHostKeyPub);
+ cloneWith("ssh://git/doesntmatter", defaultCloneDir, null, //
+ "Host git", //
+ "HostName localhost", //
+ "Port " + testPort, //
+ "User " + TEST_USER, //
+ "IdentityFile " + privateKey1.getAbsolutePath());
+ }
+
}
diff --git a/org.eclipse.jgit.ssh.apache/BUILD b/org.eclipse.jgit.ssh.apache/BUILD
index d6a145381c..a1a6c8e24c 100644
--- a/org.eclipse.jgit.ssh.apache/BUILD
+++ b/org.eclipse.jgit.ssh.apache/BUILD
@@ -10,6 +10,7 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.ssh.apache/resources",
resources = RESOURCES,
deps = [
+ "//lib:eddsa",
"//lib:slf4j-api",
"//lib:sshd-core",
"//lib:sshd-sftp",
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index e5d66536fc..1246518157 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -31,7 +31,8 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.2.0";x-inter
org.eclipse.jgit.util,
org.apache.sshd.client.session,
org.apache.sshd.client.keyverifier"
-Import-Package: org.apache.sshd.agent;version="[2.0.0,2.1.0)",
+Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
+ org.apache.sshd.agent;version="[2.0.0,2.1.0)",
org.apache.sshd.client;version="[2.0.0,2.1.0)",
org.apache.sshd.client.auth;version="[2.0.0,2.1.0)",
org.apache.sshd.client.auth.keyboard;version="[2.0.0,2.1.0)",
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index f9100855ef..366c393e42 100644
--- a/org.eclipse.jgit.ssh.apache/pom.xml
+++ b/org.eclipse.jgit.ssh.apache/pom.xml
@@ -63,6 +63,7 @@
<properties>
<translate-qualifier/>
<source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
+ <eddsa-version>0.3.0</eddsa-version>
</properties>
<dependencies>
@@ -85,6 +86,12 @@
</dependency>
<dependency>
+ <groupId>net.i2p.crypto</groupId>
+ <artifactId>eddsa</artifactId>
+ <version>${eddsa-version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java b/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
index 92a2fbd275..dde55b6d79 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
+++ b/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
@@ -80,6 +80,7 @@ public abstract class SshTestBase extends SshTestHarness {
"id_ecdsa_256", //
"id_ecdsa_384", //
"id_ecdsa_521", //
+ "id_ed25519", //
// And now encrypted. Passphrase is "testpass".
"id_dsa_testpass", //
"id_rsa_1024_testpass", //
@@ -805,7 +806,8 @@ public abstract class SshTestBase extends SshTestHarness {
// JSch fails on ECDSA 384/521 keys. Compare
// https://sourceforge.net/p/jsch/patches/10/
assumeTrue(!(getSessionFactory() instanceof JschConfigSessionFactory
- && (keyName.startsWith("id_ecdsa_384")
+ && (keyName.contains("ed25519")
+ || keyName.startsWith("id_ecdsa_384")
|| keyName.startsWith("id_ecdsa_521"))));
File cloned = new File(getTemporaryDirectory(), "cloned");
String keyFileName = keyName + "_key";
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java
index e34c3cebd6..e5fcbf9d7c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java
@@ -199,7 +199,8 @@ public class HookTest extends RepositoryTestCase {
assumeSupportedPlatform();
writeHookFile(PreCommitHook.NAME,
- "#!/bin/sh\necho \"test $1 $2\"\nread INPUT\necho $INPUT\necho 1>&2 \"stderr\"");
+ "#!/bin/sh\necho \"test $1 $2\"\nread INPUT\necho $INPUT\n"
+ + "echo $GIT_DIR\necho $GIT_WORK_TREE\necho 1>&2 \"stderr\"");
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream err = new ByteArrayOutputStream();
ProcessResult res = FS.DETECTED.runHookIfPresent(db,
@@ -208,7 +209,9 @@ public class HookTest extends RepositoryTestCase {
"arg1", "arg2" },
new PrintStream(out), new PrintStream(err), "stdin");
- assertEquals("unexpected hook output", "test arg1 arg2\nstdin\n",
+ assertEquals("unexpected hook output",
+ "test arg1 arg2\nstdin\n" + db.getDirectory().getAbsolutePath()
+ + '\n' + db.getWorkTree().getAbsolutePath() + '\n',
out.toString("UTF-8"));
assertEquals("unexpected output on stderr stream", "stderr\n",
err.toString("UTF-8"));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
index fd6301bb46..2b79d7105c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
@@ -197,6 +197,6 @@ public final class SshConstants {
/** All known default identity file names. */
public static final String[] DEFAULT_IDENTITIES = { //
- ID_RSA, ID_DSA, ID_ECDSA // , ID_ED25519 // not yet...
+ ID_RSA, ID_DSA, ID_ECDSA, ID_ED25519
};
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index 7f0308f071..e864ba76c1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -1110,6 +1110,13 @@ public abstract class FS {
hookPath);
ProcessBuilder hookProcess = runInShell(cmd, args);
hookProcess.directory(runDirectory);
+ Map<String, String> environment = hookProcess.environment();
+ environment.put(Constants.GIT_DIR_KEY,
+ repository.getDirectory().getAbsolutePath());
+ if (!repository.isBare()) {
+ environment.put(Constants.GIT_WORK_TREE_KEY,
+ repository.getWorkTree().getAbsolutePath());
+ }
try {
return new ProcessResult(runProcess(hookProcess, outRedirect,
errRedirect, stdinArgs), Status.OK);