aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-02-20 23:16:49 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:19:23 +0200
commit950d8e89a98107098f2cb00d49109cbaac960e6e (patch)
tree983928dc2a4b803598e6fc69ac4146089a2554fc /include/libssh
parent6c26a23cf4cecc2dd381820451b1b9472f98a12f (diff)
downloadlibssh-950d8e89a98107098f2cb00d49109cbaac960e6e.tar.gz
libssh-950d8e89a98107098f2cb00d49109cbaac960e6e.tar.xz
libssh-950d8e89a98107098f2cb00d49109cbaac960e6e.zip
callbacks: new callbacks for gssapi
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/callbacks.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h
index 45935206..5fb354f2 100644
--- a/include/libssh/callbacks.h
+++ b/include/libssh/callbacks.h
@@ -141,7 +141,7 @@ typedef int (*ssh_auth_password_callback) (ssh_session session, const char *user
void *userdata);
/**
- * @brief SSH Connection status callback. Tries to authenticates user with the "none" method
+ * @brief SSH authentication callback. Tries to authenticates user with the "none" method
* which is anonymous or passwordless.
* @param session Current session handler
* @param user User that wants to authenticate
@@ -152,6 +152,17 @@ typedef int (*ssh_auth_password_callback) (ssh_session session, const char *user
*/
typedef int (*ssh_auth_none_callback) (ssh_session session, const char *user, void *userdata);
+/**
+ * @brief SSH authentication callback. Tries to authenticates user with the "gssapi-with-mic" method
+ * @param session Current session handler
+ * @param user Authenticated login of the user, including realm.
+ * @param userdata Userdata to be passed to the callback function.
+ * @returns SSH_AUTH_OK Authentication is accepted.
+ * @returns SSH_AUTH_PARTIAL Partial authentication, more authentication means are needed.
+ * @returns SSH_AUTH_DENIED Authentication failed.
+ */
+typedef int (*ssh_auth_gssapi_mic_callback) (ssh_session session, const char *user, void *userdata);
+
/**
* @brief Handles an SSH service request
@@ -197,6 +208,10 @@ struct ssh_server_callbacks_struct {
*/
ssh_auth_none_callback auth_none_function;
+ /** This function gets called when a client tries to authenticate through
+ * gssapi-mic method.
+ */
+ ssh_auth_gssapi_mic_callback auth_gssapi_mic_function;
/** This functions gets called when a service request is issued by the
* client
*/