Browse Source

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>
stable-5.3
Matthias Sohn 6 years ago
parent
commit
13afcf75fe
  1. 6
      WORKSPACE
  2. 11
      lib/BUILD
  3. 7
      org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
  4. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.target
  5. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10-staging.tpd
  6. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target
  7. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd
  8. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
  9. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
  10. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
  11. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
  12. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
  13. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
  14. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
  15. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
  16. 4
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20181128170323-2018-12.tpd
  17. 1
      org.eclipse.jgit.ssh.apache.test/BUILD
  18. 1
      org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
  19. 21
      org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
  20. 1
      org.eclipse.jgit.ssh.apache/BUILD
  21. 3
      org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
  22. 7
      org.eclipse.jgit.ssh.apache/pom.xml
  23. 4
      org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
  24. 7
      org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java
  25. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
  26. 7
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java

6
WORKSPACE

@ -22,6 +22,12 @@ load(
"maven_jar", "maven_jar",
) )
maven_jar(
name = "eddsa",
artifact = "net.i2p.crypto:eddsa:0.3.0",
sha1 = "1901c8d4d8bffb7d79027686cfb91e704217c3e1",
)
maven_jar( maven_jar(
name = "jsch", name = "jsch",
artifact = "com.jcraft:jsch:0.1.54", artifact = "com.jcraft:jsch:0.1.54",

11
lib/BUILD

@ -27,6 +27,15 @@ java_library(
exports = ["@commons-logging//jar"], exports = ["@commons-logging//jar"],
) )
java_library(
name = "eddsa",
visibility = [
"//org.eclipse.jgit.ssh.apache:__pkg__",
"//org.eclipse.jgit.ssh.apache.test:__pkg__",
],
exports = ["@eddsa//jar"],
)
java_library( java_library(
name = "gson", name = "gson",
visibility = [ visibility = [
@ -163,9 +172,9 @@ java_library(
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = [ exports = [
"@mockito//jar",
"@byte_buddy//jar", "@byte_buddy//jar",
"@byte_buddy_agent//jar", "@byte_buddy_agent//jar",
"@mockito//jar",
"@objenesis//jar", "@objenesis//jar",
], ],
) )

7
org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml

@ -47,4 +47,11 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="net.i2p.crypto.eddsa"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature> </feature>

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- 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> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
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 target "jgit-4.9-staging" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/staging/2018-12/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.5" sequenceNumber="1543418280"> <target name="jgit-4.5" sequenceNumber="1543791667">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd

@ -1,7 +1,7 @@
target "jgit-4.5" with source configurePhase target "jgit-4.5" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/releases/mars/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.6" sequenceNumber="1543418269"> <target name="jgit-4.6" sequenceNumber="1543791642">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd

@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.7" sequenceNumber="1543418251"> <target name="jgit-4.7" sequenceNumber="1543791619">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd

@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.8" sequenceNumber="1543418240"> <target name="jgit-4.8" sequenceNumber="1543791605">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd

@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.9" sequenceNumber="1543418232"> <target name="jgit-4.9" sequenceNumber="1543791591">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/> <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.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" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" 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>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd

@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.11.tpd" 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/" { location "http://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

4
org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20181128011035-2018-12.tpd → 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/ // 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 [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.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] org.apache.commons.codec [1.10.0.v20180409-1845,1.10.0.v20180409-1845]

1
org.eclipse.jgit.ssh.apache.test/BUILD

@ -8,6 +8,7 @@ junit_tests(
srcs = glob(["tst/**/*.java"]), srcs = glob(["tst/**/*.java"]),
tags = ["sshd"], tags = ["sshd"],
deps = [ deps = [
"//lib:eddsa",
"//lib:junit", "//lib:junit",
"//lib:sshd-core", "//lib:sshd-core",
"//lib:sshd-sftp", "//lib:sshd-sftp",

1
org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF

@ -8,6 +8,7 @@ Bundle-Vendor: %Provider-Name
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.2.0,5.3.0)", 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;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.lib;version="[5.2.0,5.3.0)",
org.eclipse.jgit.transport;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)", org.eclipse.jgit.transport.ssh;version="[5.2.0,5.3.0)",

21
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.ssh.SshTestBase;
import org.eclipse.jgit.transport.sshd.SshdSessionFactory; import org.eclipse.jgit.transport.sshd.SshdSessionFactory;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.junit.Test;
import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theories;
import org.junit.runner.RunWith; 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());
}
} }

1
org.eclipse.jgit.ssh.apache/BUILD

@ -10,6 +10,7 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.ssh.apache/resources", resource_strip_prefix = "org.eclipse.jgit.ssh.apache/resources",
resources = RESOURCES, resources = RESOURCES,
deps = [ deps = [
"//lib:eddsa",
"//lib:slf4j-api", "//lib:slf4j-api",
"//lib:sshd-core", "//lib:sshd-core",
"//lib:sshd-sftp", "//lib:sshd-sftp",

3
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.eclipse.jgit.util,
org.apache.sshd.client.session, org.apache.sshd.client.session,
org.apache.sshd.client.keyverifier" 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;version="[2.0.0,2.1.0)",
org.apache.sshd.client.auth;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)", org.apache.sshd.client.auth.keyboard;version="[2.0.0,2.1.0)",

7
org.eclipse.jgit.ssh.apache/pom.xml

@ -63,6 +63,7 @@
<properties> <properties>
<translate-qualifier/> <translate-qualifier/>
<source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest> <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
<eddsa-version>0.3.0</eddsa-version>
</properties> </properties>
<dependencies> <dependencies>
@ -84,6 +85,12 @@
<version>${apache-sshd-version}</version> <version>${apache-sshd-version}</version>
</dependency> </dependency>
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>${eddsa-version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>

4
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_256", //
"id_ecdsa_384", // "id_ecdsa_384", //
"id_ecdsa_521", // "id_ecdsa_521", //
"id_ed25519", //
// And now encrypted. Passphrase is "testpass". // And now encrypted. Passphrase is "testpass".
"id_dsa_testpass", // "id_dsa_testpass", //
"id_rsa_1024_testpass", // "id_rsa_1024_testpass", //
@ -805,7 +806,8 @@ public abstract class SshTestBase extends SshTestHarness {
// JSch fails on ECDSA 384/521 keys. Compare // JSch fails on ECDSA 384/521 keys. Compare
// https://sourceforge.net/p/jsch/patches/10/ // https://sourceforge.net/p/jsch/patches/10/
assumeTrue(!(getSessionFactory() instanceof JschConfigSessionFactory assumeTrue(!(getSessionFactory() instanceof JschConfigSessionFactory
&& (keyName.startsWith("id_ecdsa_384") && (keyName.contains("ed25519")
|| keyName.startsWith("id_ecdsa_384")
|| keyName.startsWith("id_ecdsa_521")))); || keyName.startsWith("id_ecdsa_521"))));
File cloned = new File(getTemporaryDirectory(), "cloned"); File cloned = new File(getTemporaryDirectory(), "cloned");
String keyFileName = keyName + "_key"; String keyFileName = keyName + "_key";

7
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java

@ -199,7 +199,8 @@ public class HookTest extends RepositoryTestCase {
assumeSupportedPlatform(); assumeSupportedPlatform();
writeHookFile(PreCommitHook.NAME, 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 out = new ByteArrayOutputStream();
ByteArrayOutputStream err = new ByteArrayOutputStream(); ByteArrayOutputStream err = new ByteArrayOutputStream();
ProcessResult res = FS.DETECTED.runHookIfPresent(db, ProcessResult res = FS.DETECTED.runHookIfPresent(db,
@ -208,7 +209,9 @@ public class HookTest extends RepositoryTestCase {
"arg1", "arg2" }, "arg1", "arg2" },
new PrintStream(out), new PrintStream(err), "stdin"); 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")); out.toString("UTF-8"));
assertEquals("unexpected output on stderr stream", "stderr\n", assertEquals("unexpected output on stderr stream", "stderr\n",
err.toString("UTF-8")); err.toString("UTF-8"));

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java

@ -197,6 +197,6 @@ public final class SshConstants {
/** All known default identity file names. */ /** All known default identity file names. */
public static final String[] DEFAULT_IDENTITIES = { // public static final String[] DEFAULT_IDENTITIES = { //
ID_RSA, ID_DSA, ID_ECDSA // , ID_ED25519 // not yet... ID_RSA, ID_DSA, ID_ECDSA, ID_ED25519
}; };
} }

7
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java

@ -1110,6 +1110,13 @@ public abstract class FS {
hookPath); hookPath);
ProcessBuilder hookProcess = runInShell(cmd, args); ProcessBuilder hookProcess = runInShell(cmd, args);
hookProcess.directory(runDirectory); 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 { try {
return new ProcessResult(runProcess(hookProcess, outRedirect, return new ProcessResult(runProcess(hookProcess, outRedirect,
errRedirect, stdinArgs), Status.OK); errRedirect, stdinArgs), Status.OK);

Loading…
Cancel
Save