diff --git a/src/kex.c b/src/kex.c index ea9307d0..1a8f70b8 100644 --- a/src/kex.c +++ b/src/kex.c @@ -1590,8 +1590,8 @@ kex_method_diffie_hellman_group_exchange_sha256_key_exchange( int rc; if(key_state->state == libssh2_NB_state_idle) { - key_state->p = _libssh2_bn_init(); - key_state->g = _libssh2_bn_init(); + key_state->p = _libssh2_bn_init_from_bin(); + key_state->g = _libssh2_bn_init_from_bin(); /* Ask for a P and G pair */ key_state->request[0] = SSH_MSG_KEX_DH_GEX_REQUEST; _libssh2_htonu32(key_state->request + 1, LIBSSH2_DH_GEX_MINGROUP);