summaryrefslogtreecommitdiffstats
path: root/libssh/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/server.c')
-rw-r--r--libssh/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/server.c b/libssh/server.c
index 0a2f13f..b1f5e3b 100644
--- a/libssh/server.c
+++ b/libssh/server.c
@@ -330,7 +330,9 @@ static int dh_handshake_server(SSH_SESSION *session){
packet_wait(session,SSH2_MSG_NEWKEYS,1);
ssh_log(session, SSH_LOG_PACKET, "Got SSH_MSG_NEWKEYS");
- generate_session_keys(session);
+ if (generate_session_keys(session) < 0) {
+ return -1;
+ }
/* once we got SSH2_MSG_NEWKEYS we can switch next_crypto and current_crypto */
if(session->current_crypto)
crypto_free(session->current_crypto);