summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 5a9c5bf..d111f72 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__);