aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-12-12 00:23:53 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-12-12 00:23:53 +0100
commitad7e9d88fbf36d0fdfb169cfa45c67d15da13263 (patch)
treef79a7ad6714eecafc7618feed9a5535f5ee33b9e /include/libssh
parent3ace7817b4c438d34f63313493cd82ae0dcf2757 (diff)
downloadlibssh-ad7e9d88fbf36d0fdfb169cfa45c67d15da13263.tar.gz
libssh-ad7e9d88fbf36d0fdfb169cfa45c67d15da13263.tar.xz
libssh-ad7e9d88fbf36d0fdfb169cfa45c67d15da13263.zip
packet SSH_KEXINIT received and parsed
Resolved some bugs in the callback mechanism as well
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/kex.h30
-rw-r--r--include/libssh/priv.h2
-rw-r--r--include/libssh/session.h2
3 files changed, 33 insertions, 1 deletions
diff --git a/include/libssh/kex.h b/include/libssh/kex.h
new file mode 100644
index 00000000..89030d95
--- /dev/null
+++ b/include/libssh/kex.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the SSH Library
+ *
+ * Copyright (c) 2009 by Aris Adamantiadis
+ *
+ * The SSH Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version.
+ *
+ * The SSH Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the SSH Library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifndef KEX_H_
+#define KEX_H_
+
+#include "libssh/priv.h"
+#include "libssh/callbacks.h"
+
+SSH_PACKET_CALLBACK(ssh_packet_kexinit);
+
+#endif /* KEX_H_ */
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 8413a22a..19044773 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -120,6 +120,7 @@ SSH_PACKET_CALLBACK(ssh_packet_ignore_callback);
/* client.c */
int ssh_send_banner(ssh_session session, int is_server);
+void ssh_connection_callback(ssh_session session);
/* config.c */
int ssh_config_parse_file(ssh_session session, const char *filename);
@@ -156,7 +157,6 @@ extern const char *ssh_kex_nums[];
int ssh_send_kex(ssh_session session, int server_kex);
void ssh_list_kex(ssh_session session, KEX *kex);
int set_kex(ssh_session session);
-int ssh_get_kex(ssh_session session, int server_kex);
int verify_existing_algo(int algo, const char *name);
char **space_tokenize(const char *chain);
int ssh_get_kex1(ssh_session session);
diff --git a/include/libssh/session.h b/include/libssh/session.h
index 2dae9ccb..c7584994 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -34,6 +34,8 @@ enum ssh_session_state_e {
SSH_SESSION_STATE_SOCKET_CONNECTED,
SSH_SESSION_STATE_BANNER_RECEIVED,
SSH_SESSION_STATE_INITIAL_KEX,
+ SSH_SESSION_STATE_KEXINIT_RECEIVED,
+ SSH_SESSION_STATE_DH,
SSH_SESSION_STATE_AUTHENTICATING,
SSH_SESSION_STATE_AUTHENTICATED,
SSH_SESSION_STATE_ERROR