diff options
Diffstat (limited to 'libssh/server.c')
-rw-r--r-- | libssh/server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/server.c b/libssh/server.c index 7b3602b9..0a2f13fe 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -300,7 +300,9 @@ static int dh_handshake_server(SSH_SESSION *session){ pubkey=publickey_to_string(pub); publickey_free(pub); dh_import_pubkey(session,pubkey); - dh_build_k(session); + if (dh_build_k(session) < 0) { + return -1; + } if (make_sessionid(session) != SSH_OK) { return -1; } |