Commit 3e611db0 authored by Niels Möller's avatar Niels Möller
Browse files

* server_keyexchange.c (do_init_dh): Copy the server key (as

strings can't be shared).

Rev: src/server_keyexchange.c:1.16
Rev: src/server_keyexchange.h:1.7
parent bcb3463d
......@@ -160,7 +160,7 @@ static int do_init_dh(struct keyexchange_algorithm *c,
dh->super.handler = do_handle_dh_init;
init_diffie_hellman_instance(closure->dh, &dh->dh, connection);
dh->dh.server_key = closure->server_key;
dh->dh.server_key = lsh_string_dup(closure->server_key);
dh->signer = closure->signer;
dh->install = make_server_install_keys(algorithms);
dh->finished = finished;
......@@ -29,6 +29,7 @@
#include "keyexchange.h"
#include "publickey_crypto.h"
/* This function consumes the server key */
struct keyexchange_algorithm *
make_dh_server(struct diffie_hellman_method *dh,
struct lsh_string *server_key,
Markdown is supported
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