diff options
author | Dmitriy Kuznetsov <dk@yandex.ru> | 2012-09-04 16:16:15 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-09-04 16:17:46 +0200 |
commit | e689375e452fc6b3e1fd31b0e9819d1600bd7704 (patch) | |
tree | 7b8e44183ce1745d33eabc991b3f1d248bf6052a /src/kex.c | |
parent | 977951e96afd07705d9d88f733c7224810325da1 (diff) | |
download | libssh-e689375e452fc6b3e1fd31b0e9819d1600bd7704.tar.gz libssh-e689375e452fc6b3e1fd31b0e9819d1600bd7704.tar.xz libssh-e689375e452fc6b3e1fd31b0e9819d1600bd7704.zip |
dh: Add support for diffie-hellman-group14-sha1.
Diffstat (limited to 'src/kex.c')
-rw-r--r-- | src/kex.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -65,10 +65,10 @@ #endif #ifdef HAVE_ECDH -#define KEY_EXCHANGE "ecdh-sha2-nistp256,diffie-hellman-group1-sha1" +#define KEY_EXCHANGE "ecdh-sha2-nistp256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1" #define HOSTKEYS "ecdsa-sha2-nistp256,ssh-rsa,ssh-dss" #else -#define KEY_EXCHANGE "diffie-hellman-group1-sha1" +#define KEY_EXCHANGE "diffie-hellman-group14-sha1,diffie-hellman-group1-sha1" #define HOSTKEYS "ssh-rsa,ssh-dss" #endif @@ -393,6 +393,8 @@ int ssh_kex_select_methods (ssh_session session){ } if(strcmp(session->next_crypto->kex_methods[SSH_KEX], "diffie-hellman-group1-sha1") == 0){ session->next_crypto->kex_type=SSH_KEX_DH_GROUP1_SHA1; + } else if(strcmp(session->next_crypto->kex_methods[SSH_KEX], "diffie-hellman-group14-sha1") == 0){ + session->next_crypto->kex_type=SSH_KEX_DH_GROUP14_SHA1; } else if(strcmp(session->next_crypto->kex_methods[SSH_KEX], "ecdh-sha2-nistp256") == 0){ session->next_crypto->kex_type=SSH_KEX_ECDH_SHA2_NISTP256; } |