aboutsummaryrefslogtreecommitdiff
path: root/libssh/kex.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 04:40:01 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-03-04 04:40:01 +0000
commit8e04bf0ef1c84e3c05551f640f8b8ac9b0dc9d50 (patch)
tree4c6e0002241f11505c9a0067e760e2bcd829a8e4 /libssh/kex.c
parent77743b75f41bd353c09da6a740562d621ed9382d (diff)
downloadlibssh-8e04bf0ef1c84e3c05551f640f8b8ac9b0dc9d50.tar.gz
libssh-8e04bf0ef1c84e3c05551f640f8b8ac9b0dc9d50.tar.xz
libssh-8e04bf0ef1c84e3c05551f640f8b8ac9b0dc9d50.zip
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
Diffstat (limited to 'libssh/kex.c')
-rw-r--r--libssh/kex.c10
1 files changed, 5 insertions, 5 deletions
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<<SSH_CIPHER_3DES))){
- ssh_set_error(NULL,SSH_FATAL,"Remote server doesn't accept 3des");
+ ssh_set_error(session,SSH_FATAL,"Remote server doesn't accept 3des");
return -1;
}
packet_clear_out(session);