aboutsummaryrefslogtreecommitdiff
path: root/libssh/auth.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-06-16 23:02:49 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-06-16 23:02:49 +0000
commit77603dbc5a5c55ecfa8d583c133db844673fb690 (patch)
tree96c4ad653c74e1d53791f4a73c49d43cdcb58359 /libssh/auth.c
parent5367581ce1d52518343bb8ede60738f4035e033a (diff)
downloadlibssh-77603dbc5a5c55ecfa8d583c133db844673fb690.tar.gz
libssh-77603dbc5a5c55ecfa8d583c133db844673fb690.tar.xz
libssh-77603dbc5a5c55ecfa8d583c133db844673fb690.zip
Big changes :
refactoring of the socket class. Now the buffering happens in the socket class. enhanced the logging system. Cleaned up some debugging messages. Verified the working with ssh-1. If this cleanup introduced bugs (it did but corrected the found ones) at least, they will be easier to find also added the (c) and fixed dates for updated files git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@169 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/auth.c')
-rw-r--r--libssh/auth.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index a2fd722d..57d0bd61 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -1,6 +1,6 @@
/* auth.c deals with authentication methods */
/*
-Copyright 2003-2005 Aris Adamantiadis
+Copyright (c) 2003-2008 Aris Adamantiadis
This file is part of the SSH Library
@@ -160,7 +160,6 @@ int ssh_userauth_none(SSH_SESSION *session,char *username){
user=string_from_char(username);
method=string_from_char("none");
service=string_from_char("ssh-connection");
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_REQUEST);
buffer_add_ssh_string(session->out_buffer,user);
buffer_add_ssh_string(session->out_buffer,service);
@@ -220,7 +219,6 @@ int ssh_userauth_offer_pubkey(SSH_SESSION *session, char *username,int type, STR
method=string_from_char("publickey");
algo=string_from_char(ssh_type_to_char(type));
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_REQUEST);
buffer_add_ssh_string(session->out_buffer,user);
buffer_add_ssh_string(session->out_buffer,service);
@@ -284,7 +282,6 @@ int ssh_userauth_pubkey(SSH_SESSION *session, char *username, STRING *publickey,
/* we said previously the public key was accepted */
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_REQUEST);
buffer_add_ssh_string(session->out_buffer,user);
buffer_add_ssh_string(session->out_buffer,service);
@@ -352,7 +349,6 @@ int ssh_userauth_password(SSH_SESSION *session,char *username,char *password){
method=string_from_char("password");
password_s=string_from_char(password);
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_REQUEST);
buffer_add_ssh_string(session->out_buffer,user);
buffer_add_ssh_string(session->out_buffer,service);
@@ -567,7 +563,6 @@ static int kbdauth_init(SSH_SESSION *session,
STRING *method=string_from_char("keyboard-interactive");
int err;
enter_function();
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_REQUEST);
buffer_add_ssh_string(session->out_buffer,user_s);
buffer_add_ssh_string(session->out_buffer,service);
@@ -650,7 +645,6 @@ static int kbdauth_send(SSH_SESSION *session) {
int i;
int err;
enter_function();
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_INFO_RESPONSE);
buffer_add_u32(session->out_buffer,htonl(session->kbdint->nprompts));
for(i=0;i<session->kbdint->nprompts;++i){