From bdde6c3d604ed4f248efbd7da14623c6c0c18a2e Mon Sep 17 00:00:00 2001 From: James Housley Date: Fri, 8 Jun 2007 15:57:46 +0000 Subject: [PATCH] In the code rewrite libssh2_kex_method_diffie_hellman_group14_sha1_key_exchange() lost two initializer routines, restore them. --- src/kex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kex.c b/src/kex.c index 0208640..5e8d75d 100644 --- a/src/kex.c +++ b/src/kex.c @@ -646,6 +646,9 @@ libssh2_kex_method_diffie_hellman_group14_sha1_key_exchange(LIBSSH2_SESSION *ses int ret; if (key_state->state == libssh2_NB_state_idle) { + key_state->p = _libssh2_bn_init(); /* SSH2 defined value (p_value) */ + key_state->g = _libssh2_bn_init(); /* SSH2 defined value (2) */ + /* g == 2 */ /* Initialize P and G */ _libssh2_bn_set_word(key_state->g, 2);