diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-03 23:06:26 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-03 23:06:26 +0200 |
commit | 149a2b4a18a70fd41aef9cdfdb4b7b277187a95f (patch) | |
tree | b2d1cffdaacf5c77a0f02decfd488bb1fa44ba85 /libssh | |
parent | ab5b4c7cfe668ee4103de146c2a739532abfc416 (diff) | |
download | libssh-149a2b4a18a70fd41aef9cdfdb4b7b277187a95f.tar.gz libssh-149a2b4a18a70fd41aef9cdfdb4b7b277187a95f.tar.xz libssh-149a2b4a18a70fd41aef9cdfdb4b7b277187a95f.zip |
Temporary server fixup for options structure delet
server_set_kex needs to be rewritten
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/server.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libssh/server.c b/libssh/server.c index 7821faac..2a8ba334 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -45,7 +45,6 @@ #include "libssh/socket.h" #include "libssh/channels.h" #include "libssh/session.h" -#include "libssh/options.h" #include "libssh/misc.h" #include "libssh/keys.h" #include "libssh/dh.h" @@ -303,6 +302,15 @@ void ssh_bind_free(SSH_BIND *sshbind){ } extern char *supported_methods[]; +/** @internal + * This functions sets the Key Exchange protocols to be accepted + * by the server. They depend on + * -What the user asked (via options) + * -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) { KEX *server = &session->server_kex; @@ -311,7 +319,7 @@ 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, "ssh-dss,ssh-rsa") < 0) { @@ -326,6 +334,7 @@ static int server_set_kex(ssh_session session) { return -1; } } +#endif server->methods = malloc(10 * sizeof(char **)); if (server->methods == NULL) { @@ -333,7 +342,7 @@ static int server_set_kex(ssh_session session) { } for (i = 0; i < 10; i++) { - if ((wanted = options->wanted_methods[i]) == NULL) { + if ((wanted = session->wanted_methods[i]) == NULL) { wanted = supported_methods[i]; } server->methods[i] = strdup(wanted); |