-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02cfeb9
commit c5792fe
Showing
4 changed files
with
65 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ key exchange:: | |
`diffie-hellman-group14-sha256`, `diffie-hellman-group15-sha512`, `diffie-hellman-group16-sha512`, `diffie-hellman-group17-sha512`, `diffie-hellman-group18-sha512` | ||
`diffie-hellman-group-exchange-sha1`, `diffie-hellman-group-exchange-sha256`, | ||
`ecdh-sha2-nistp256`, `ecdh-sha2-nistp384`, `ecdh-sha2-nistp521`, `[email protected]` | ||
|
||
SSHJ also supports the following extended (non official) key exchange algoriths: | ||
`[email protected]`, `diffie-hellman-group15-sha256`, `[email protected]`, `[email protected]`, | ||
`diffie-hellman-group16-sha256`, `[email protected]`, `[email protected]`, `[email protected]` | ||
|
@@ -81,7 +82,7 @@ signatures:: | |
`ssh-rsa`, `ssh-dss`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-ed25519` | ||
|
||
mac:: | ||
`hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`, `hmac-sha2-256`, `hmac-sha2-512`, `hmac-ripemd160` | ||
`hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`, `hmac-sha2-256`, `hmac-sha2-512`, `hmac-ripemd160`, `[email protected]` | ||
|
||
compression:: | ||
`zlib` and `[email protected]` (delayed zlib) | ||
|
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 |
---|---|---|
|
@@ -128,5 +128,5 @@ Subsystem sftp /usr/lib/ssh/sftp-server | |
# PermitTTY no | ||
# ForceCommand cvs server | ||
|
||
|
||
KexAlgorithms curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 | ||
macs [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected] |
46 changes: 46 additions & 0 deletions
46
src/itest/groovy/com/hierynomus/sshj/transport/kex/KexSpec.groovy
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,46 @@ | ||
package com.hierynomus.sshj.transport.kex | ||
|
||
import com.hierynomus.sshj.IntegrationBaseSpec | ||
import com.hierynomus.sshj.transport.mac.Macs | ||
import net.schmizz.sshj.DefaultConfig | ||
import net.schmizz.sshj.transport.kex.Curve25519DH | ||
import net.schmizz.sshj.transport.kex.Curve25519SHA256 | ||
import net.schmizz.sshj.transport.kex.DH | ||
import net.schmizz.sshj.transport.kex.DHGexSHA1 | ||
import net.schmizz.sshj.transport.kex.DHGexSHA256 | ||
import net.schmizz.sshj.transport.kex.ECDH | ||
import net.schmizz.sshj.transport.kex.ECDHNistP | ||
import spock.lang.Unroll | ||
|
||
class KexSpec extends IntegrationBaseSpec { | ||
|
||
@Unroll | ||
def "should correctly connect with #kex Key Exchange"() { | ||
given: | ||
def cfg = new DefaultConfig() | ||
cfg.setKeyExchangeFactories(kexFactory) | ||
def client = getConnectedClient(cfg) | ||
|
||
when: | ||
client.authPublickey(USERNAME, KEYFILE) | ||
|
||
then: | ||
client.authenticated | ||
|
||
where: | ||
kexFactory << [DHGroups.Group1SHA1(), | ||
DHGroups.Group14SHA1(), | ||
DHGroups.Group14SHA256(), | ||
DHGroups.Group16SHA512(), | ||
DHGroups.Group18SHA512(), | ||
new DHGexSHA1.Factory(), | ||
new DHGexSHA256.Factory(), | ||
new Curve25519SHA256.Factory(), | ||
new Curve25519SHA256.FactoryLibSsh(), | ||
new ECDHNistP.Factory256(), | ||
new ECDHNistP.Factory384(), | ||
new ECDHNistP.Factory521()] | ||
kex = kexFactory.name | ||
} | ||
|
||
} |
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