aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-12-26 16:51:33 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-12-26 16:51:33 +0100
commit6f3505bf6b3a747df2f6dec55b29228d1b0a0a4e (patch)
tree41b6d4c7d2dd472808f0c33e2b35d80ba24f286c /include/libssh
parentbfdc48e320143183927933c23f43ff87def798f3 (diff)
downloadlibssh-6f3505bf6b3a747df2f6dec55b29228d1b0a0a4e.tar.gz
libssh-6f3505bf6b3a747df2f6dec55b29228d1b0a0a4e.tar.xz
libssh-6f3505bf6b3a747df2f6dec55b29228d1b0a0a4e.zip
Asynchronous service request
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/priv.h1
-rw-r--r--include/libssh/session.h17
2 files changed, 17 insertions, 1 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 1b751842..1f2a1216 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -123,6 +123,7 @@ int ssh_send_banner(ssh_session session, int is_server);
void ssh_connection_callback(ssh_session session);
SSH_PACKET_CALLBACK(ssh_packet_dh_reply);
SSH_PACKET_CALLBACK(ssh_packet_newkeys);
+SSH_PACKET_CALLBACK(ssh_packet_service_accept);
/* config.c */
int ssh_config_parse_file(ssh_session session, const char *filename);
diff --git a/include/libssh/session.h b/include/libssh/session.h
index c7584994..5cf5af5a 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -41,6 +41,20 @@ enum ssh_session_state_e {
SSH_SESSION_STATE_ERROR
};
+/** @internal
+ * @brief states of the authentication service request
+ */
+enum ssh_auth_service_state_e {
+ /** initial state */
+ SSH_AUTH_SERVICE_NONE=0,
+ /** Authentication service request packet sent */
+ SSH_AUTH_SERVICE_SENT,
+ /** Service accepted */
+ SSH_AUTH_SERVICE_ACCEPTED,
+ /** Access to service denied (fatal) */
+ SSH_AUTH_SERVICE_DENIED
+};
+
struct ssh_session_struct {
struct error_struct error;
struct ssh_socket_struct *socket;
@@ -60,7 +74,7 @@ struct ssh_session_struct {
/* !=0 when the user got a session handle */
int alive;
/* two previous are deprecated */
- int auth_service_asked;
+// int auth_service_asked;
/* socket status */
int blocking; // functions should block
@@ -78,6 +92,7 @@ struct ssh_session_struct {
enum ssh_session_state_e session_state;
int packet_state;
int dh_handshake_state;
+ enum ssh_auth_service_state_e auth_service_state;
ssh_string dh_server_signature; //information used by dh_handshake.
KEX server_kex;