diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-29 10:02:49 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-29 10:02:49 +0100 |
commit | 9f034aca9c848106d4fc03da9ca6ec140565413f (patch) | |
tree | c5d8548eff2c2594db2f715ea05089cfcb12f307 | |
parent | 22bdfa388611f941da9f2a5ad5ce0487ee5789a0 (diff) | |
download | libssh-9f034aca9c848106d4fc03da9ca6ec140565413f.tar.gz libssh-9f034aca9c848106d4fc03da9ca6ec140565413f.tar.xz libssh-9f034aca9c848106d4fc03da9ca6ec140565413f.zip |
Fix server kex
-rw-r--r-- | libssh/server.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libssh/server.c b/libssh/server.c index c4ecff59..0abb9fc5 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -305,7 +305,6 @@ extern char *supported_methods[]; * -What is available (keys) * It should then accept the intersection of what the user asked * and what is available, and return an error if nothing matches - * @bug To rewrite, it's broken !! */ static int server_set_kex(ssh_session session) { @@ -315,22 +314,20 @@ static int server_set_kex(ssh_session session) { ZERO_STRUCTP(server); ssh_get_random(server->cookie, 16, 0); -#if 0 if (session->dsa_key != NULL && session->rsa_key != NULL) { - if (ssh_bind_options_set(options, SSH_BIND_OPTIONS_HOSTKEY, + if (ssh_options_set(session, SSH_BIND_OPTIONS_HOSTKEY, "ssh-dss,ssh-rsa") < 0) { return -1; } } else if (session->dsa_key != NULL) { - if (ssh_bind_options_set(options, SSH_BIND_OPTIONS_HOSTKEY, "ssh-dss") < 0) { + if (ssh_options_set(session, SSH_BIND_OPTIONS_HOSTKEY, "ssh-dss") < 0) { return -1; } } else { - if (ssh_bind_options_set(options, SSH_BIND_OPTIONS_HOSTKEY, "ssh-rsa") < 0) { + if (ssh_options_set(session, SSH_BIND_OPTIONS_HOSTKEY, "ssh-rsa") < 0) { return -1; } } -#endif server->methods = malloc(10 * sizeof(char **)); if (server->methods == NULL) { |