diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-11-13 18:10:13 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-15 22:26:20 +0100 |
commit | 057f1d9123f43aceecf413acc5e759e4a97dc8e4 (patch) | |
tree | b03299110e190dd720cadb7111615fcd15ec092c /org.eclipse.jgit.ssh.apache.test | |
parent | 180bc67e28f333a8b23413a0789b6563c3a5b9de (diff) | |
download | jgit-057f1d9123f43aceecf413acc5e759e4a97dc8e4.tar.gz jgit-057f1d9123f43aceecf413acc5e759e4a97dc8e4.zip |
ssh: Handle "ProxyJump none" from SSH config file
Since OpenSSH 7.8, the ProxyJump directive accepts the value "none"[1]
to override and clear a setting that might otherwise be contributed by
another (wildcard) host entry.
[1] https://bugzilla.mindrot.org/show_bug.cgi?id=2869
Change-Id: Ia35e82c6f8c58d5c6b8040cda7a07b220f43fc21
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache.test')
-rw-r--r-- | org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
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 85626d8ee3..ccaf98ced0 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 @@ -355,6 +355,21 @@ public class ApacheSshTest extends SshTestBase { } @Test + public void testJumpHostNone() throws Exception { + // Should not try to go through the non-existing proxy + cloneWith("ssh://server/doesntmatter", defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump none", // + "", // + "Host *", // + "ProxyJump " + TEST_USER + "@localhost:1234"); + } + + @Test public void testJumpHostWrongKeyAtProxy() throws Exception { // Test that we find the proxy server's URI in the exception message SshdSocketAddress[] forwarded = { null }; |