-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from norrisjeremy/20210906
Allow ssh-agent keys that are unsupported
- Loading branch information
Showing
25 changed files
with
1,209 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,13 +106,9 @@ public class JSch{ | |
|
||
config.put("ecdh-sha2-nistp", "com.jcraft.jsch.jce.ECDHN"); | ||
|
||
config.put("ssh-ed25519", "com.jcraft.jsch.jce.SignatureEd25519"); | ||
config.put("ssh-ed448", "com.jcraft.jsch.jce.SignatureEd448"); | ||
|
||
config.put("curve25519-sha256", "com.jcraft.jsch.DH25519"); | ||
config.put("[email protected]", "com.jcraft.jsch.DH25519"); | ||
config.put("curve448-sha512", "com.jcraft.jsch.DH448"); | ||
config.put("xdh", "com.jcraft.jsch.jce.XDH"); | ||
|
||
config.put("dh", "com.jcraft.jsch.jce.DH"); | ||
config.put("3des-cbc", "com.jcraft.jsch.jce.TripleDESCBC"); | ||
|
@@ -156,12 +152,10 @@ public class JSch{ | |
config.put("keypairgen.dsa", "com.jcraft.jsch.jce.KeyPairGenDSA"); | ||
config.put("keypairgen.rsa", "com.jcraft.jsch.jce.KeyPairGenRSA"); | ||
config.put("keypairgen.ecdsa", "com.jcraft.jsch.jce.KeyPairGenECDSA"); | ||
config.put("keypairgen.eddsa", "com.jcraft.jsch.jce.KeyPairGenEdDSA"); | ||
config.put("random", "com.jcraft.jsch.jce.Random"); | ||
|
||
config.put("none", "com.jcraft.jsch.CipherNone"); | ||
|
||
config.put("[email protected]", "com.jcraft.jsch.jce.ChaCha20Poly1305"); | ||
config.put("[email protected]", "com.jcraft.jsch.jce.AES128GCM"); | ||
config.put("[email protected]", "com.jcraft.jsch.jce.AES256GCM"); | ||
|
||
|
@@ -189,6 +183,26 @@ public class JSch{ | |
|
||
config.put("pbkdf", "com.jcraft.jsch.jce.PBKDF"); | ||
|
||
if(JavaVersion.getVersion()>=11){ | ||
config.put("[email protected]", "com.jcraft.jsch.jce.ChaCha20Poly1305"); | ||
config.put("xdh", "com.jcraft.jsch.jce.XDH"); | ||
} | ||
else{ | ||
config.put("[email protected]", "com.jcraft.jsch.bc.ChaCha20Poly1305"); | ||
config.put("xdh", "com.jcraft.jsch.bc.XDH"); | ||
} | ||
|
||
if(JavaVersion.getVersion()>=15){ | ||
config.put("keypairgen.eddsa", "com.jcraft.jsch.jce.KeyPairGenEdDSA"); | ||
config.put("ssh-ed25519", "com.jcraft.jsch.jce.SignatureEd25519"); | ||
config.put("ssh-ed448", "com.jcraft.jsch.jce.SignatureEd448"); | ||
} | ||
else{ | ||
config.put("keypairgen.eddsa", "com.jcraft.jsch.bc.KeyPairGenEdDSA"); | ||
config.put("ssh-ed25519", "com.jcraft.jsch.bc.SignatureEd25519"); | ||
config.put("ssh-ed448", "com.jcraft.jsch.bc.SignatureEd448"); | ||
} | ||
|
||
config.put("StrictHostKeyChecking", "ask"); | ||
config.put("HashKnownHosts", "no"); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.jcraft.jsch; | ||
|
||
final class JavaVersion { | ||
|
||
static int getVersion() { | ||
return 8; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.