aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-06-12 20:54:33 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2011-06-12 20:54:33 +0200
commit113de1354322f3fb310b23b412c548d8a9e417bc (patch)
treee2be35ef0d5dba3f295e3bafe59a2c4a1fbdfd80 /src
parentb54e8cdae5b742d98a015fd91708b308848e86e3 (diff)
downloadlibssh-113de1354322f3fb310b23b412c548d8a9e417bc.tar.gz
libssh-113de1354322f3fb310b23b412c548d8a9e417bc.tar.xz
libssh-113de1354322f3fb310b23b412c548d8a9e417bc.zip
Test for ecdh and dh-group1
Diffstat (limited to 'src')
-rw-r--r--src/options.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 5a9c5bf5..d111f726 100644
--- a/src/options.c
+++ b/src/options.c
@@ -312,6 +312,11 @@ int ssh_options_set_algo(ssh_session session, int algo,
* Set the symmetric cipher server to client (const char *,
* comma-separated list).
*
+ * - SSH_OPTIONS_KEY_EXCHANGE:
+ * Set the key exchange method to be used (const char *,
+ * comma-separated list). ex:
+ * "ecdh-sha2-nistp256,diffie-hellman-group1-sha1"
+ *
* - SSH_OPTIONS_COMPRESSION_C_S:
* Set the compression to use for client to server
* communication (const char *, "yes", "no" or a specific
@@ -583,6 +588,15 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
return -1;
}
break;
+ case SSH_OPTIONS_KEY_EXCHANGE:
+ if(value == NULL) {
+ ssh_set_error_invalid(session, __FUNCTION__);
+ return -1;
+ } else {
+ if (ssh_options_set_algo(session, SSH_KEX, value) < 0)
+ return -1;
+ }
+ break;
case SSH_OPTIONS_COMPRESSION_C_S:
if (value == NULL) {
ssh_set_error_invalid(session, __FUNCTION__);