From 8e04bf0ef1c84e3c05551f640f8b8ac9b0dc9d50 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 4 Mar 2008 04:40:01 +0000 Subject: fixed a load of ssh_set_error(NULL,...) git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@139 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/kex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libssh/kex.c') diff --git a/libssh/kex.c b/libssh/kex.c index 1d66f28b..21d920d3 100644 --- a/libssh/kex.c +++ b/libssh/kex.c @@ -408,7 +408,7 @@ int ssh_get_kex1(SSH_SESSION *session){ } ssh_say(3,"Got a SSH_SMSG_PUBLIC_KEY\n"); if(buffer_get_data(session->in_buffer,session->server_kex.cookie,8)!=8){ - ssh_set_error(NULL,SSH_FATAL,"Can't get cookie in buffer"); + ssh_set_error(session,SSH_FATAL,"Can't get cookie in buffer"); return -1; } buffer_get_u32(session->in_buffer,&server_bits); @@ -422,7 +422,7 @@ int ssh_get_kex1(SSH_SESSION *session){ ko=buffer_get_u32(session->in_buffer,&supported_authentications_mask); if((ko!=sizeof(u32)) || !host_mod || !host_exp || !server_mod || !server_exp){ ssh_say(2,"Invalid SSH_SMSG_PUBLIC_KEY packet\n"); - ssh_set_error(NULL,SSH_FATAL,"Invalid SSH_SMSG_PUBLIC_KEY packet"); + ssh_set_error(session,SSH_FATAL,"Invalid SSH_SMSG_PUBLIC_KEY packet"); if(host_mod) free(host_mod); if(host_exp) @@ -449,15 +449,15 @@ int ssh_get_kex1(SSH_SESSION *session){ free(server_mod); free(host_exp); free(host_mod); - svr=publickey_from_string(serverkey); - host=publickey_from_string(hostkey); + svr=publickey_from_string(session, serverkey); + host=publickey_from_string(session, hostkey); session->next_crypto->server_pubkey=string_copy(hostkey); session->next_crypto->server_pubkey_type="ssh-rsa1"; /* now, we must choose an encryption algo */ /* hardcode 3des */ if(!(supported_ciphers_mask & (1<