diff options
author | Kenny Root <kenny@the-b.org> | 2013-04-10 18:43:35 -0700 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2013-04-10 20:14:43 -0700 |
commit | 1e98217978aaccfcf62097266f699acf5b22493e (patch) | |
tree | 6105f3632913e61d836fd047349e67d8f9d55f7a /src/com/trilead/ssh2/packets/PacketKexInit.java | |
parent | d36f48b37697e8f7797a9a8435647577675a6a5b (diff) | |
download | connectbot-1e98217978aaccfcf62097266f699acf5b22493e.tar.gz connectbot-1e98217978aaccfcf62097266f699acf5b22493e.tar.bz2 connectbot-1e98217978aaccfcf62097266f699acf5b22493e.zip |
Add ECDH support
Add support for the ECDH methods required by RFC 5656
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
Diffstat (limited to 'src/com/trilead/ssh2/packets/PacketKexInit.java')
-rw-r--r-- | src/com/trilead/ssh2/packets/PacketKexInit.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/trilead/ssh2/packets/PacketKexInit.java b/src/com/trilead/ssh2/packets/PacketKexInit.java index 7da5067..2a961c2 100644 --- a/src/com/trilead/ssh2/packets/PacketKexInit.java +++ b/src/com/trilead/ssh2/packets/PacketKexInit.java @@ -4,7 +4,6 @@ package com.trilead.ssh2.packets; import java.io.IOException;
import java.security.SecureRandom;
-import com.trilead.ssh2.compression.CompressionFactory;
import com.trilead.ssh2.crypto.CryptoWishList;
import com.trilead.ssh2.transport.KexParameters;
@@ -21,10 +20,10 @@ public class PacketKexInit KexParameters kp = new KexParameters();
- public PacketKexInit(CryptoWishList cwl, SecureRandom rnd)
+ public PacketKexInit(CryptoWishList cwl) {
kp.cookie = new byte[16];
- rnd.nextBytes(kp.cookie);
+ new SecureRandom().nextBytes(kp.cookie); kp.kex_algorithms = cwl.kexAlgorithms;
kp.server_host_key_algorithms = cwl.serverHostKeyAlgorithms;
|