summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libssh/kex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index 6716fc9..45ec3f7 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -419,6 +419,7 @@ int ssh_get_kex1(SSH_SESSION *session){
enc_session=encrypt_session_key(session,svr,host);
bits=string_len(enc_session)*8 - 7;
+ ssh_say(2,"%d bits,%d bytes encrypted session\n",bits,string_len(enc_session));
bits=htons(bits);
/* the encrypted mpint */
buffer_add_data(session->out_buffer,&bits,sizeof(u16));
@@ -434,8 +435,7 @@ int ssh_get_kex1(SSH_SESSION *session){
session->current_crypto=session->next_crypto;
session->next_crypto=NULL;
if(packet_wait(session,SSH_SMSG_SUCCESS,1)){
- printf("qqchose a merdé: %s\n",ssh_get_error(session));
- exit(1);
+ ssh_set_error(session,SSH_FATAL,"Key exchange failed : %s\n",ssh_get_error(session));
return -1;
}
ssh_say(1,"received SSH_SMSG_SUCCESS\n");