Commit 5448300e authored by Niels Möller's avatar Niels Möller
Browse files

(kexinit_filter): Deleted command.

Rev: src/keyexchange.c:1.90
Rev: src/keyexchange.h:1.58
parent d5f2ad9e
...@@ -781,38 +781,6 @@ make_simple_kexinit(struct randomness *r, ...@@ -781,38 +781,6 @@ make_simple_kexinit(struct randomness *r,
return &res->super; return &res->super;
} }
/* FIXME: Move this to a separate file keyexchange_commands.c? */
/* (kexinit_filter simple_kexinit alist)
*
* Destructively modifies the simple_kexinit to include only hostkey
* algorithms that have keys in alist. */
DEFINE_COMMAND2(kexinit_filter)
(struct command_2 *s UNUSED,
struct lsh_object *a1,
struct lsh_object *a2,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST(simple_kexinit, init, a1);
CAST_SUBTYPE(alist, keys, a2);
init->hostkey_algorithms
= filter_algorithms(keys, init->hostkey_algorithms);
if (!init->hostkey_algorithms)
{
werror("No hostkey algorithms advertised.\n");
init->hostkey_algorithms = make_int_list(1, ATOM_NONE, -1);
}
assert(LIST_LENGTH(init->hostkey_algorithms));
COMMAND_RETURN(c, init);
}
static int static int
install_keys(struct object_list *algorithms, install_keys(struct object_list *algorithms,
struct ssh_connection *connection, struct ssh_connection *connection,
......
...@@ -129,8 +129,6 @@ make_simple_kexinit(struct randomness *r, ...@@ -129,8 +129,6 @@ make_simple_kexinit(struct randomness *r,
struct int_list *compression_algorithms, struct int_list *compression_algorithms,
struct int_list *languages); struct int_list *languages);
extern struct command_2 kexinit_filter;
#define KEXINIT_FILTER (&kexinit_filter.super.super)
/* Sends the keyexchange message, which must already be stored in /* Sends the keyexchange message, which must already be stored in
* connection->kexinits[connection->flags & CONNECTION_MODE] * connection->kexinits[connection->flags & CONNECTION_MODE]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment