diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-08-08 13:36:35 +0200 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-08-08 13:36:35 +0200 |
commit | 09753591fae875cee71eb5674a0103844351e508 (patch) | |
tree | d0077fb86aceccbe65475865d52d26a048ca834c | |
parent | 2f7bf6b53602bffffaf07ecdbc308a9876b36369 (diff) | |
download | jgit-09753591fae875cee71eb5674a0103844351e508.tar.gz jgit-09753591fae875cee71eb5674a0103844351e508.zip |
Ensure that JSch knows HostKeyAlgorithms ssh-rsa and ssh-dss
Without these registrations, JSch's up-front checks which algorithms
are available at all fail if the ssh config explicitly sets only these
algorithms.
Bug: 537790
Change-Id: Idb0431190a7f101913363ee95af6c8fcbda6c923
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java index 1d5248a15d..eab3b3c0cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java @@ -372,6 +372,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { */ protected JSch createDefaultJSch(FS fs) throws JSchException { final JSch jsch = new JSch(); + JSch.setConfig("ssh-rsa", JSch.getConfig("signature.rsa")); //$NON-NLS-1$ //$NON-NLS-2$ + JSch.setConfig("ssh-dss", JSch.getConfig("signature.dss")); //$NON-NLS-1$ //$NON-NLS-2$ configureJSch(jsch); knownHosts(jsch, fs); identities(jsch, fs); |